View Full Version : Bug: Error when deleting from Combat Tracker

Dire Weasel
February 21st, 2021, 05:31
This error happened several times during my game when I deleted combatants from the Combat Tracker:

[2/19/2021 5:48:58 PM] [ERROR] Handler error: [string "ct/scripts/template_groupcount.lua"]:39: attempt to index global 'self' (a nil value)
[2/19/2021 5:48:58 PM] [ERROR] Handler error: [string "ct/scripts/ct_combatantlist.lua"]:153: attempt to call global 'applyFilter' (a nil value)

Running SWADE with 50 Fathoms on FGU, no additional extensions, so I'm not sure if it's an issue in SWADE or 50F.

After the game I couldn't find an easily reproducible case, so I'm not sure of the precise trigger conditions.

Moon Wizard
February 21st, 2021, 18:18
I think I have an idea of what is going on script-wise; but I'd need a reproducible case to make sure it's fixed. I believe this is a SW ruleset specific; and isn't impacted by Setting extension.

Any ideas what steps you followed? It seems like it would have something to do with deleting a combatant after doing something else.
Also, how were you deleting combatant? (Right click menu, or a different way...)


Mike Serfass
February 21st, 2021, 18:28
I saw this error as well last night (FGU, SWADE). I deleted an npc from CT which had been added before the deluge of updates and hot fixes. I couldn't reproduce it, so I think it occurred because something in the CT record changed in one of the updates. I didn't create a log file because I had other unrelated errors from an extension I was working on. I'll create a log file if it happens again (and there aren't other errors).

Dire Weasel
February 21st, 2021, 18:59
I am able to reproduce the issue. The critical step is closing the combat tracker. Other than that, it doesn't seem to matter how the combatant is removed, nor whether they're on a map.

Sample steps:

1) Open or create a SWADE campaign.
2) Open the Combat Tracker.
3) Add an NPC to the combat tracker (I added a Bear from the default NPCs).
4) Close the Combat Tracker.
5) Open the Combat Tracker.
6) Right click and select "Delete Combatant(s)".
7) Confirm deletion.

Mike Serfass
February 21st, 2021, 22:45
I got the error following Dire Weasel's steps. Here's the error log.

Moon Wizard
February 23rd, 2021, 17:00
Thanks for the exact steps. That's helpful. It appears that this has been around in the Savage Worlds ruleset, since long before the last round of changes. I've sent a note to the ruleset developer, @Ikael, to see how he would like to handle this one. Even if he doesn't fix directly, I would need his input to see what he was trying to accomplish in certain parts of the ruleset code.