"Unknown Source" error
LadyCailinBot opened this issue ยท 5 comments
CMDHELPER-3028 - Reported by Nessiesson
Running the following code:
@loc = get_spawn()
bind(player_spawn, null, null, @event,
modify_event(location, @loc)))```
While the error is on line 4, it throws this error:
```[21:45:43 ERROR]: [CommandHelper][ERROR][RUNTIME] Using undefined variable: @loc C:\Users\Nessie\Dropbox\lethe\plugins\CommandHelper\LocalPackages\Main.ms:4
[21:45:43 INFO]: FormatException: Expecting an array, received NULL
<<main code>>:Unknown Source:0```
I am currently running CH #2832, though it was also an issue before the changes introduced in #2828 (tested build is #2823).
Comment by PseudoKnight
@loc was undefined in the player_spawn script, which is separate. You have to pass external vars in via bind() custom params or import/export.
Comment by Nessiesson
Yes, but it should be able to tell me where I messed up.
Comment by PseudoKnight
Oh, that's what you're asking. Everything in events has Target.UNKNOWN. But I suspect a target could be added in modifyEvent(). Most events with mutable data would need to be updated.
I can see LadyCailin disagreeing with me on this, but I'm going to call it an enhancement request. :P
Comment by LadyCailin
Nah, this is a bug. Anything that has target unknown is a bug, unless you're doing something really meta or something.