Game broke after update

Hello,

I was using the October 2013 release for a game I’m making but I needed to use anchor points so I migrated to the last release (March 2014). All was going fine until I went to main.lua and saved (all I did was just save the file, no changes). The simulator reloaded and gave me an error : 

Corona Simulator Syntax error

File: main.lua

Line: 1

Unexpected symbol near ‘˛’

The error persists even if I completely erase the contents of main.lua, even if I put a single print command. Here is my normal main.lua :

– hide the status bar

display.setStatusBar( display.HiddenStatusBar )

– include the Corona “storyboard” module

local storyboard = require “storyboard”

– load game screen

storyboard.gotoScene(“game”)

Here is my config.lua :

application = {

    content = {

        width = 768,

        height = 1024

    }   

}

This was working fine before I installed the new version of the SDK and it appears now it has an issue with the mere existence with main.lua (even if completely empty as I said before).

Thanks for your help :slight_smile:

Are you actually using Corona Editor?  If so, what version (in Sublime Text do Corona Editor > About Corona Editor…)

What text editor are you using to edit main.lua?

Upload the main.lua file that is giving you the problem with your answers and I’ll take a look.  It’s probably got a invisible character in it that isn’t valid Lua syntax.

Thanks Perry, I got it working. It was an issue with encoding. I’m using TextMate on the Mac to edit and it sometimes saves the files with UTF-16BE encoding. Saving the file with UTF-8 encoding solved the issue.

Are you actually using Corona Editor?  If so, what version (in Sublime Text do Corona Editor > About Corona Editor…)

What text editor are you using to edit main.lua?

Upload the main.lua file that is giving you the problem with your answers and I’ll take a look.  It’s probably got a invisible character in it that isn’t valid Lua syntax.

Thanks Perry, I got it working. It was an issue with encoding. I’m using TextMate on the Mac to edit and it sometimes saves the files with UTF-16BE encoding. Saving the file with UTF-8 encoding solved the issue.