Page 1 of 1

Not crashing when the lua script have errors?

Posted: Tue Mar 19, 2013 5:50 pm
by ficolas
When my lua script has errors (wich is a lot because im using notepad to edit...) I think that the game shouldnt crash, just send you to the main menu, and something weird, is that it sometimes do, and sometimes crashes...

Re: Not crashing when the lua script have errors?

Posted: Tue Mar 19, 2013 6:25 pm
by FreeER
I think when it is an actual lua error (like you used the wrong number of = signs or forgot to use then) it crashes the game, but if it was an ingame error it takes you to the main menu (I may be wrong about that)

It would be nice not having to restart the game 1-20 (depening on how much i've written) times when debugging my code lol

also, try using notepad ++ (they have a zip package so you don't have to install) if you haven't already :)

Re: Not crashing when the lua script have errors?

Posted: Tue Mar 19, 2013 6:30 pm
by ficolas
FreeER wrote:(they have a zip package so you don't have to install)
nice news :D

Re: Not crashing when the lua script have errors?

Posted: Fri Mar 22, 2013 3:29 pm
by ficolas
The game crashes if the script had a problem before running it (sintax errors etc) and it doesnt crash when it is a error like that a variable is nil.

(but im not 100% sure)

Re: Not crashing when the lua script have errors?

Posted: Fri Mar 22, 2013 6:56 pm
by FreeER
Yeah that sounds right

Re: Not crashing when the lua script have errors?

Posted: Sat Oct 26, 2013 11:48 pm
by N3X15
Yeah, having better error handling would be terrific. Trying to pin down what exactly is causing the game to crash to desktop on startup is insanely difficult. Even a log file with some sort of debugging would be helpful to both Factorio staff and us.

Re: Not crashing when the lua script have errors?

Posted: Sun Oct 27, 2013 8:26 am
by ficolas
N3X15 wrote:Yeah, having better error handling would be terrific. Trying to pin down what exactly is causing the game to crash to desktop on startup is insanely difficult. Even a log file with some sort of debugging would be helpful to both Factorio staff and us.
There is now better error handling, most of the times the game crashes because a lua error in the control.lua , it isnt a cdt, it just goes to the main screen.

Re: Not crashing when the lua script have errors?

Posted: Sun Oct 27, 2013 8:30 am
by kovarex
ficolas wrote:
N3X15 wrote:Yeah, having better error handling would be terrific. Trying to pin down what exactly is causing the game to crash to desktop on startup is insanely difficult. Even a log file with some sort of debugging would be helpful to both Factorio staff and us.
There is now better error handling, most of the times the game crashes because a lua error in the control.lua , it isnt a cdt, it just goes to the main screen.
There was an error (ctd), when there was syntactic error in the script that is used when starting new game. slpwnd already fixed this for 0.7.5.

Re: Not crashing when the lua script have errors?

Posted: Mon Oct 28, 2013 8:54 am
by slpwnd
N3X15 wrote:Even a log file with some sort of debugging would be helpful to both Factorio staff and us.
The crash on lua error was a bug. However we have played with an idea for a log file for a while.