MRI: Fix exception message box script name and display script index #64

Merged
Ancurio merged 1 commits from show_exc_fixes into master 2014-09-02 17:48:10 +00:00

1 Commits

Author SHA1 Message Date
Jonas Kulla 3b7b8657ea MRI: Fix exception message box script name and display script index
Previously, when the script names in the backtrace were in the form
'SectionXXX'/'{XXXX}' (default RMXP behavior), this same name would
be shown in the error message box, whereas RMXP always displays the
actual script name (eg. 'Scene_Map') instead; only with
useScriptNames=true was mkxp's behavior mostly correct.
Fix this by keeping a backtrace format -> actual script name mapping
and always using the script name in the message box.
The script name and line would also be parsed wrongly if the name
contained any colons, fix this by walking the exception string
back to front instead.

Also prepend the script index to the name when useScriptNames=true;
this is invaluable when debugging projects where multiple scripts
carry the same name. The format is 'XXX:Script_Name'.
2014-09-02 17:16:14 +02:00