I am having a similar issue with sublime text 3 (OSX). Everything is up to date (sublime text and I have Corona Editor 1.7.0) and was working yesterday but today it is not. I receive two errors first it cannot find my document (opened and closed project but no change)
error: The document “TOSHIBA(my disk drive name)” could not be opened. Corona Simulator cannot open files of this type.
then after I click off that error this error pops up: The document “main.lua” could not be opened. Corona Simulator cannot open files in the “Lua Source Code” format.
Runs straight from the Corona Simulator App itself however.
We have just pushed Corona Editor 1.7.1 which fixes the issue where Run Project doesn’t work on Windows.
The update will show up in an hour or so (the Sublime Text Package Control system doesn’t react instantly to updates). You can quit and restart Sublime Text to check for updates or use Tools ▶ Command Palette… [Package Control: Upgrade Package]
Also, you will have to rename “Corona SDK” folder to Corona.
Also note that after I click off the error message boxes the Corona Simulator app remains up - if I say relaunch or change phone type it will launch properly and also run debugging in the sublime text build panel. ( I hope I worded that properly to make sense)
Make sure your main.lua (or whatever .lua file you have open when you hit Run Project ) has its syntax set to Corona Lua using View ▶ Syntax ▶ Corona Lua
This may have gotten unset by the Sublime Text update.
From the README:
Most of the features of the plugin rely on the current Syntax setting so when editing files you should use View > Syntax > Corona Lua command to set the correct syntax for the file. You will probably also want to change Sublime Text’s default for .lua files by choosing View > Syntax > Open all with current extension as… > Corona Lua when you have a .lua file open in the editor.
You can access the README at any time using the menu item Sublime Text ▶ Preferences ▶ Package Settings ▶ Corona Editor ▶ README
I checked the Syntax already and both that you mentioned above are still set to Corona Lua. I spent a while double checking everything but now I am thinking it might have to do with the update but not sure with what.
One more thing to note that I tested… The Corona Editor>Corona Debugger>Run works properly and starts up the simulator just fine. When I build from Corona Editior>Run Project this will give me the errors
Can you post your Sublime Text console log here after you’ve tried to run and gotten the error? To get the console log, hit Ctrl+` (control backquote) and note the pane that opens at the bottom of your Sublime Text window. Click in the pane and type Cmd+A Cmd+C and then paste the log into a reply here.
about: Corona Editor for Sublime Text | Version: 1.7.0 | Installed: 2017-09-27 13:28:18 | Corona Editor is the official Corona SDK plugin for Sublime Text | [Sublime Text 3143/stable/osx/x64]
about: Corona Editor for Sublime Text | Version: 1.7.0 | Installed: 2017-09-27 13:28:18 | Corona Editor is the official Corona SDK plugin for Sublime Text | [Sublime Text 3143/stable/osx/x64]
I’m running 2017.3135 (2017.9.7) , I’ve actually installed zerobrain as a test. It has no issues compileing.
I also get this error after heaps of the previous error: The document “main.lua” could not be opened. Corona Simulator cannot open files in the “Lua Source Code” format.
And I had all this set up as shown ?
From the README:
Most of the features of the plugin rely on the current Syntax setting so when editing files you should use View > Syntax > Corona Lua command to set the correct syntax for the file. You will probably also want to change Sublime Text’s default for .lua files by choosing View > Syntax > Open all with current extension as… > Corona Lua when you have a .lua file open in the editor.
My simulator was working just fine when I left the office yesterday and today I’m getting the same error. No matter what I do it’s telling me I can’t run the code in my simulator.
Well that did it. I had a space in my disk drive name so I renamed it. I was able to build and run in sublime with the simulator without a problem. I don’t know what was done to the update but a space in a name never caused a problem before. Thanks.