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

My script doesn't read the condition

1575418155
Alain H.
Pro
Sheet Author
API Scripter
Hello, I have a problem with One Click script, Knightstylemarkers. <a href="https://gist.github.com/Zakarik/a3124c825a0eff7bac2585e817503a50" rel="nofollow">https://gist.github.com/Zakarik/a3124c825a0eff7bac2585e817503a50</a> I've solved most of my problems, I can read the parameter, but it still doesn't seem to check the condition correctly, refusing to apply the update on the tokens of all pages. When I use the same API in custom (with a little adaptation), it works without any problem. Thank you in advance for your answers.
1575554739
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
What's the adaptation for using it as a custom?
1575568781

Edited 1575568943
Alain H.
Pro
Sheet Author
API Scripter
Only that : &nbsp;&nbsp;&nbsp;&nbsp;var version = "1.0"; &nbsp;&nbsp;&nbsp; var allPage = true; &nbsp;&nbsp;&nbsp; var currentPageTokens; &nbsp;&nbsp;&nbsp; var name; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; var checkInstall = function() { &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; //var gc = global['knightstylesmarkers']; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; //allPage = gc['Toute Page']; &nbsp;&nbsp;&nbsp; }; It's on "true" by default like that. When I try with the One Click API, It is considered as always "false". .