unitscan

unitscan

821k Downloads

Problem with adding entries after last update

Flowy opened this issue ยท 2 comments

commented

After last update, I started getting this error

1452x invalid key to 'next' [string "=[C]"]: in function next'
[string "@unitscan/unitscan.lua"]:270: in function `UPDATE'
[string "@unitscan/unitscan.lua"]:3: in function <unitscan/unitscan.lua:3>

Locals:
(*temporary) =

{
LIL TIMMY = true
GOBBLER = true
SEWER BEAST = true
GAZELE = true
}
(*temporary) = "MOTHER FANG"`

Its triggered when I'm changing zones, because I have WA that changes scanned names based on zone. The problem does not happen always, it depends on how many names there is to add.

Would it be possible to change the iteration so its not affected by latest updates, or use one that accepts removing/adding entries?

Also other option would be to allow public API, that would prevent the iteration from failing. Expected functions would be to read currently tracked, add, remove,
bonus function would be to add listener for when the name is triggered, and option to disable default announcement (sounds and visuals)

mentioned WA is this https://wago.io/Pyfd62ceG , its using direct table unitscan_targets as thats only public entry that you provide, it is triggered when changing zones, does not fail every time, but quite often, after fail unitscan keeps failing until reload or the original entries are added

commented

Is it fixed now?

commented

Yes, seems to not throw errors now, thank you