Dyson,
When using ZeroBraneStudio (http://studio.zerobrane.com), and you try to run a game using MTE using either the green “start debugging” toolbar icon or Project->Run menu option, the following error is given:
Compilation error on line 26: [string "/Users/jsmith/Projects/Corona Projects/Tut1/m..."]:26: '\<name\>' expected near 'goto'
Line 26 is:
mte.goto({locX = 1, locY = 15, blockScale = display.viewableContentWidth / 15})
If I use Project->Run as Scratchpad, it does run the game in the simulator and works great. This is just an annoyance.
The same thing happens on the MTE sample projects…
If I create a new Corona project without MTE, all three methods of running the code work within ZeroBraneStudio.
I am not sure if this is a bug in ZeroBraneStudio or with your software. If you don’t mind, could you take a look with one of your sample projects and maybe contact the creators of ZeroBraneStudio and give them a copy of MTE to try to track down the issue?
The first time you run ZeroBraneStudio you should go to Project->Lua Interpreter, and select Corona.
UPDATE:
It looks like this is caused by line 151 of mte.lua
local goto
I believe that ZeroBraneStudio is complaining because it does not recognize this line as a function override and believes it is a syntax error. I think this will have to be resolved by ZeroBraneStudio but they may need a copy of MTE to do testing with.
UPDATE 2:
It appears that ZeroBraneStudio uses Lua 5.2 internally which now has ‘goto’ as a reserved keyword which cannot be overridden.
It is now my recommendation to replace ‘goto’ with a non-reserved keyword just in case Corona were to change in the future.
Right now, it seems that ZeroBraneStudio uses 5.2 so it fails whereas “Run as Scratchpad” appears to skip syntax checking and just shoves the code off to Corona.