Use trigger path string if it has no label

Posted by Kahenraz on Thu 12 Jul 2018 07:11 AM — 4 posts, 18,238 views.

#0
Run-time error
World: Aardwolf
Immediate execution
[string "Trigger: "]:15: attempt to index a nil value
stack traceback:
        [string "Trigger: "]:15: in main chunk


It took me a while to locate this trigger since it didn't have a label. It would help if the path was used to help locate the trigger there is no label.

Maybe:

[string "Trigger (path): (ungrouped) -> Progress thus far: (.+)"]
USA Global Moderator #1
Hmm. Wasn't there a change a while back to include the trigger match pattern in errors? I must be misremembering, because I can't find any note about it.
Amended on Fri 13 Jul 2018 03:38 PM by Fiendish
Australia Forum Administrator #2
A work-around is to make the trigger call a script in a script file (and not send-to-script) which would then give you the script function name and a line number.
Australia Forum Administrator #3
Another thing you can do is turn on Trace (Game menu -> Trace) which tells you which triggers are being called.