Error executing "getTokens": the token name or id "343778971601000000000000" is unknown.
Here is the code.
Code: Select all
[broadcast(getSelected())]
[h : selectedId = getSelected()]
[broadcast(selectedId)]
[h : MStance = 0]
[h : cond = ""]
[h, if(isPC()) : cond = '{ range: {upto:1, distancePerCell:0, metric:"ONE_TWO_ONE", token: ' + selectedId + '}, npc:1,visible:1 }' ; cond = '{ range: {upto:1, distancePerCell:0, metric:"ONE_TWO_ONE", token: ' + selectedId + '}, pc:1,visible:1 }']
[broadcast(cond)]
[h: ids = getTokens("json", cond)]
00000000343778971601000000000000
343778971601000000000000
{"range":{"upto":1,"distancePerCell":0,"metric":"ONE_TWO_ONE","token":343778971601000000000000},"npc":1,"visible":1}
Error executing "getTokens": the token name or id "343778971601000000000000" is unknown.
Notice that when it first broadcasts "getSelected()", the ID has leading zeros, like most tokens? But once its assigned to the selectedId variable, those leading zeros disappear (second broadcast) and then when that variable is using in setting the conditions for the getTokens call, it fails because its not a valid token.
Here is the out put for a token that's actually working.
00000000343778971C01000000000000
00000000343778971C01000000000000
{"range":{"upto":1,"distancePerCell":0,"metric":"ONE_TWO_ONE","token":"00000000343778971C01000000000000"},"npc":1,"visible":1}
And then the getTokens call works fine. Notice that the leading zeros didn't disappear between the two broadcasts?
Now for the really goofy thing. If I copy the bad token and paste, guess what? It now works FINE.
Reason i bring this up? This happened twice last during our game. Token was working fine, then suddenly started throwing this error. Copied the token, pasted it, deleted the old one and then it started working again.
So there's a workaround for this problem but in the past year of using 1.3.91, I never once saw this problem. Now on the first two sessions of using 1.4.0.5, I've seen it a couple of times. Any ideas?