Closed Dev-Roland closed 2 years ago
Interesting! Thanks for the report, I'll take a look at this when I'm back from holiday if someone else doesn't get to it first
I updated the issue with a second method. I've isolated out a single action that consistently triggers the error. I'm not sure if it was the 2nd method that triggered the error all along or if there is more than one trigger. I have a feeling it was the former.
I was looking at the code earlier, and I did speculate that's possible. Trusts can/do attempt WS when out of range, particularly Valaineral.
There's a code block to generate an action packet and then populates the targets based on if they are in range or not. I am guessing this means that we need to populate an action with an "out of range" message, cancel the action, or otherwise. Thanks for the repro steps!
Related issue: https://github.com/LandSandBoat/server/issues/2019
I'll be working on this
Branch affected by issue
base
Steps to reproduce
Steps to reproduce: (Omicron server)
METHOD 1
METHOD 2
NOTE: The error printed in the console is "_Lua runtime error: battlemod/parse_actionpacket.lua:709: attempt to index field '?' (a nil value)" Line 709: _local msgID = act.targets[1].actions[1].message
Expected behavior
Apparently a portion of the action packet is expected to be defined that is undefined in LSB.