Jump to content

[SOLVED] is it possible to make script engine error script file and line?


photo

Recommended Posts

currently, the script engine only output the script error with error message, sometime it will output the error position in world script, but the line number are sometimes wrong. and the error message never said which line in which file if there are some files included with world script, you'll never know which file has some errors. this makes debugging script a very hard work,

 

like this error message

17:25:24 Variable::getFloatSafe(): can't convert mat4 to float
17:25:24 World::update(): world update function return 0

 

I know this comes from which script file, but I never know which line has the error.

 

Hope this can be improved. it will save a looot time when creating scripts.

Link to comment

The line is not specified, because it is not a compile-time error but rather a run-time one. Check console for disassembly information. You can also break the application at the error point, to check the call stack. Plus, there's a world_disassemble console command available.

Link to comment
  • 2 years later...
×
×
  • Create New...