#5282 closed defect (fixed)
Petra serialization error when ceasefire ends
Reported by: | elexis | Owned by: | Silier |
---|---|---|---|
Priority: | Must Have | Milestone: | Alpha 24 |
Component: | AI | Keywords: | |
Cc: | Patch: | Phab:D2695 |
Description
As reported by DangerousI on https://wildfiregames.com/forum/index.php?/topic/24727-javascript-error-petrabot-typeerror/&tab=comments#comment-360274
In multiplayermode there occurs this error when ceasefire runs out:
ERROR: JavaScript error: simulation/ai/petra/_petrabot.js line 140 TypeError: savedEvents[key][ i] is undefined
Change History (4)
comment:1 by , 6 years ago
comment:2 by , 4 years ago
Milestone: | Backlog → Work In Progress |
---|---|
Patch: | → Phab:D2695 |
comment:4 by , 4 years ago
Milestone: | Work In Progress → Alpha 24 |
---|
Note:
See TracTickets
for help on using tickets.
That's the offending code. msg would be empty while the AI expects all the events to be objects. Not sure, but I don't think this code is even needed. AI's onUpdate recieves the state which contains a boolean called ceasefireActive. Quick and easy fix would be to push {} instead of msg I guess.