Pat said: The pad number is a state variable, just there to prevent an accidental duplication of pad names. Any time a pad is created or there is an attempt to create, it increments. Pad ids are unique as they are token ids, the number increment is just to avoid having "new pad token" as the name of a bunch of pads. It has nothing to do with the actual targeting of teleport pads. I'm curious about this and what it means: Nicolas G. said: And sometimes, some of my pages can't receive new teleport pad without making a crash of the API. I am obliged to create a new page redraw all I have done with the previous and delete the previous one... If it was possible to clear the memories, it will act like it was the first time I create a teleport pad... Is it stupid ? "...can't receive new teleport pad without making a crash of the API" All of the information on a teleport pad is stored in the teleport pad. If you create a pad and link it, and then copy and paste it into a new page or into the same page, any pads linked to it will have their links "broken" unless they are unlinked and re-linked, because the new teleport token has a new token id, which is how links are managed. The pasted teleport pad will not have its outgoing links broken (they are also by token id, and those "outgoing" ids have not changed) but any pad linked to this copied and pasted pad will no longer work , as the token id of this pad is now different (part of the Roll20 create object method, to prevent a collision of object ids). None of that should require redrawing a page entirely... So I'm curious - what's the message on the API crash, so I can troubleshoot it? Of course, I never try to copy paste some pad. For my actual game, I have deleted all the teleport token, if I create a new token called teleport 81, then I switch to a second page called teleport 81 (I don't know why the incrementation is not made...). When my player try the teleport, I got this error: TypeError: Cannot read property 'get' of undefined
TypeError: Cannot read property 'get' of undefined
at apiscript.js:807:35
at Function.each (/home/node/d20-api-server/node_modules/underscore/underscore.js:188:9)
at limboSwap (apiscript.js:805:15)
at teleportToken (apiscript.js:884:23)
at apiscript.js:698:25
at Function.each (/home/node/d20-api-server/node_modules/underscore/underscore.js:188:9)
at teleportPadCheck (apiscript.js:679:15)
at autoTeleportCheck (apiscript.js:1193:17)
at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:154:1), <anonymous>:65:16)
at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:154:1), <anonymous>:70:8) And if a create a new page, create a new teleport token, create a second new page, a second new teleport token,take the player on the first new page, when the player goes on the first teleport pad, the token travel good, but the player stay on the first new page and I have to manualy move him to the second new page but no error occur... I am not sure to be completely clear because my birth language is french... But I can do more test or try to follow a step by step to try something to reproduce the crash...