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

One script breaking another script

HoneyBadger's Power Cards script is breaking Stephen's weather/time script. When I try to use a command for Stephen's script, I get this TypeError: Cannot call method 'indexOf' of undefined at Object.roll20API.processMessage (evalmachine.<anonymous>:1847:22) at evalmachine.<anonymous>:1754:23 at eval ( Is there something that I can do really easily, like add something to one of the scripts to prevent this from happening or is this much more difficult to solve than that?
It shouldn't break... I built the script to be self contained. It should execute and do nothing if it doesn't find a proper api command.
1399503858

Edited 1399507078
I wasn't sure where I should post this, so thanks. When I have your script enabled, the weather script is broken and throws me that error every time I try and use a command for that script, and when it's disabled, I can use the weather script fine. So I don't see that it could be anything other than your script. Edit: The weather script uses a separate script to handle its commands, it's supposed to be a way to handle api commands for all scripts as to not cause conflicts I think, I think that is what is causing the issue. When I have that script enabled and I try to use a power card, I get the same error. So that's the culprit.
1399543999
Alex L.
Pro
Sheet Author
Jarret B. said: I wasn't sure where I should post this, so thanks. When I have your script enabled, the weather script is broken and throws me that error every time I try and use a command for that script, and when it's disabled, I can use the weather script fine. So I don't see that it could be anything other than your script. Edit: The weather script uses a separate script to handle its commands, it's supposed to be a way to handle api commands for all scripts as to not cause conflicts I think, I think that is what is causing the issue. When I have that script enabled and I try to use a power card, I get the same error. So that's the culprit. If you mean APIchat or what ever it is called, one version of that script is missing a ; at the end and breaks other scripts.
1399565436

Edited 1399566272
<a href="https://app.roll20.net/forum/post/454852/script-api-command-process-standard-model#post-458972" rel="nofollow">https://app.roll20.net/forum/post/454852/script-api-command-process-standard-model#post-458972</a> this is what I'm using. Is this the one that's bugged? Or or is there another one that I can use, because it is that script that is breaking other scripts that don't use it to handle commands or or this one? <a href="https://app.roll20.net/forum/post/458468/script-apicmd-api-command-processing-with-option-parsing/#post-458940" rel="nofollow">https://app.roll20.net/forum/post/458468/script-apicmd-api-command-processing-with-option-parsing/#post-458940</a> I know you have one Alex, should I use yours? Ahhh so many choices.
1399618974

Edited 1399618991
Alex L.
Pro
Sheet Author
Jarret B. said: <a href="https://app.roll20.net/forum/post/454852/script-api-command-process-standard-model#post-458972" rel="nofollow">https://app.roll20.net/forum/post/454852/script-api-command-process-standard-model#post-458972</a> this is what I'm using. Is this the one that's bugged? Or or is there another one that I can use, because it is that script that is breaking other scripts that don't use it to handle commands or or this one? <a href="https://app.roll20.net/forum/post/458468/script-apicmd-api-command-processing-with-option-parsing/#post-458940" rel="nofollow">https://app.roll20.net/forum/post/458468/script-apicmd-api-command-processing-with-option-parsing/#post-458940</a> I know you have one Alex, should I use yours? Ahhh so many choices. It was a version of apicmd that had the bug in it, but you cant chouse what one to use it has to be the one the script was designed for. Also my old one was terible.
Stephen didn't specifically say which script to use to handle the commands. Just said to use any script to handle it.
1399667894
Alex L.
Pro
Sheet Author
Jarret B. said: Stephen didn't specifically say which script to use to handle the commands. Just said to use any script to handle it. Can't really help as you would have had to write your own code to do that.
Ah well - it's not a script that needs to be on the entire time - I'll just turn it on when I need to record time. Hopefully Stephen is going to update his scripts, haven't seen him post recently. Thanks for the help Alex
You could just fix the bug.... and add the semicolon it needs.