Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×

Teleport API Error

First time posting on the forums, so I hope I'm following the right protocol. I installed the teleport API from the Roll20 Mod library, and went through the process of linking three different pages together. Everything works well while I am setting things up, but when I attempt to test the telepads I get the following error message: TypeError: Cannot read property 'get' of undefined TypeError: Cannot read property 'get' of undefined at apiscript.js:21092:42 at Array.forEach (<anonymous>) at reconcileTargetPageId (apiscript.js:21091:25) at limboSwap (apiscript.js:21081:17) at teleportToken (apiscript.js:21122:23) at apiscript.js:20933:25 at Function.each (/home/node/d20-api-server/node_modules/underscore/underscore-node-f.cjs:1323:7) at teleportPadCheck (apiscript.js:20905:15) at autoTeleportCheck (apiscript.js:21507:21) at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:168:1), <anonymous>:65:16) I am not sure what I am doing wrong, or how to fix this issue. Any help would be greatly appreciated.
1659318036
The Aaron
Roll20 Production Team
API Scripter
This is happening because there is a player id in the controlled by of the token you are moving that doesn't match a player in your game.&nbsp; This could happen because you Transmogrified or Player Vaulted it in from another game where a player was assigned to it, or it could be because you've assigned all players to it.&nbsp; All players is stored as the string 'all' for a player id, which doesn't match a player, so results in grabbing an undefined object and trying to call .get() on it. There are several ways to fix this, but I'll do the one that prevents a crash, namely ignoring the 'all' undefined object.&nbsp; Give this a try and let me know if it works.&nbsp; If it does, I'll commit it to the repo to fix this for later people as well: <a href="https://gist.github.com/shdwjk/918b8fa07a6cd05a7deaae1c8173d851" rel="nofollow">https://gist.github.com/shdwjk/918b8fa07a6cd05a7deaae1c8173d851</a>
That fix worked perfectly. Thank you so much for your help. My players are going to be floored by the effect!