Not crashing when the lua script have errors?

ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Not crashing when the lua script have errors?

Post 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...

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: Not crashing when the lua script have errors?

Post 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 :)
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me :)
Or drop into #factorio on irc.esper.net

ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Re: Not crashing when the lua script have errors?

Post by ficolas »

FreeER wrote:(they have a zip package so you don't have to install)
nice news :D

ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Re: Not crashing when the lua script have errors?

Post 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)

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: Not crashing when the lua script have errors?

Post by FreeER »

Yeah that sounds right
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me :)
Or drop into #factorio on irc.esper.net

User avatar
N3X15
Inserter
Inserter
Posts: 24
Joined: Sat Oct 26, 2013 11:44 pm
Contact:

Re: Not crashing when the lua script have errors?

Post 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.

ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Re: Not crashing when the lua script have errors?

Post 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.

kovarex
Factorio Staff
Factorio Staff
Posts: 8195
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Not crashing when the lua script have errors?

Post 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.

slpwnd
Factorio Staff
Factorio Staff
Posts: 1835
Joined: Sun Feb 03, 2013 2:51 pm
Contact:

Re: Not crashing when the lua script have errors?

Post 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.

Post Reply

Return to “Implemented mod requests”