darkf / darkfo

DarkFO, a post-nuclear RPG remake (of Fallout 2)
Apache License 2.0
135 stars 12 forks source link

Script logging should show currently executing script and procedure name #120

Open darkf opened 6 years ago

darkf commented 6 years ago

This would make it much easier to track down scripting issues.

darkf commented 6 years ago

a71e1189c10e3e7e201b26a72d22d6074d9724aa makes it so that warnings show the script name, if given by the warn call.

I'd like the currently executing procedure name as well, but it requires either having a separate call stack for procedure names (properly pushed/popped with call/ret opcodes) or setting the current proedure name on call opcodes and reading the address stack for return values and mapping them to procedure names.

If this ends up being too involved, it's fine to drop it and just use the script name.