Community Forum

Is there a way to get more info from lua errors?

Forum Overview >> Scripting

Created01.06.2017 20:13

Tim Derks (timmiej93) 01.06.2017 20:13
In my time with scripting for FS, I've noticed that there are two kinds of lua errors, namely very basic ones, and more extensive ones.
The simple are something like this:

Error: Running LUA method '...'.
path/path/path/filename.lua(lineNr): error

The more extensive ones seem to be the entire callstack of the error, including calling function, etc. etc..
What I'm wondering about is: what determines which type of error is shown? Obviously, for debugging purposes, the more extensive errors are way more helpful. Is there a way to force all lua errors to be this extensive?

Emil Drefers (Unknown) 06.06.2017 07:27

nope. It all depends on what error is caused/triggered.
You can print callstacks manually (in your mods), but that's a different story, as you are refering to default scripts.


Note: Log in to post. Create a new account here.