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 .
×
Create a free account

Ran in to a problem with my !randomizer script - Need a professional script god!

1520516059

Edited 1520517578
Hi guys, Issue maybe solved! See second post Background and data: I am running my campaign with the !randomizer script Located here:&nbsp; <a href="https://app.roll20.net/forum/post/2657434/script-r" rel="nofollow">https://app.roll20.net/forum/post/2657434/script-r</a>... And the Gits: <a href="https://gist.github.com/mattkauffman23/cf179c9fe71" rel="nofollow">https://gist.github.com/mattkauffman23/cf179c9fe71</a>... I also use the Shell script which is required for the !randomize script. Located here: <a href="https://github.com/Roll20/roll20-api-scripts/blob/" rel="nofollow">https://github.com/Roll20/roll20-api-scripts/blob/</a>... The only two other scripts I am running (In case there is a collision between the scripts somehow is my random dice script !ob) Located here:&nbsp; <a href="https://gist.github.com/dancodan/9294aeeab3aa1804f" rel="nofollow">https://gist.github.com/dancodan/9294aeeab3aa1804f</a>... And Aarons Import/Export-script Located here:&nbsp; <a href="https://app.roll20.net/forum/post/1144568/script-t" rel="nofollow">https://app.roll20.net/forum/post/1144568/script-t</a>... The problem: Now and then when I am creating new tables to use with the !randomizer script (Which is a wonderfull scrip that you really should try if you haven't already) I get this error message from the API: For reference, the error message generated was: TypeError: Cannot set property 'name' of undefined TypeError: Cannot set property 'name' of undefined at apiscript.js:513:17 at iterator (/home/node/d20-api-server/node_modules/underscore/underscore.js:184:16) at Function.&lt;anonymous&gt; (/home/node/d20-api-server/node_modules/underscore/underscore.js:199:14) at getResults (apiscript.js:511:17) at buildResponse (apiscript.js:499:15) at Object.onInput [as callback] (apiscript.js:459:16) at Object.handleApiMessage (apiscript.js:920:28) at handleChatMessage (apiscript.js:926:8) at eval (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:146:1), &lt;anonymous&gt;:65:16) at Object.publish (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:146:1), &lt;anonymous&gt;:70:8) My own troubleshooting: Pretty much nothing. I can't seem to replicate it on demand. It seems to happen when I try running my macros (!randomizer Encounter) for example. I have no clue if this is a glitch within the !randomizer script or if there is a collision between my scripts. If I save the script again everything works fine, until it suddenly does not.&nbsp; I know this might be a handful, but I am so useless with scripting and I would really love to get this script to work! Thanks in advance for anyone taking the time to read this post Regards Daniel
And just like that it seems like I figured it out.&nbsp; Seems like if there is a rollable table which gets triggered by the !randomizer command and it is empty . The script goes bananas and shuts down! I managed to replicate it by using an empty rollable table, and the problem went away when I added a single item
1520520835
The Aaron
Pro
API Scripter
Great!