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

[help!] API not executing.

1391485021

Edited 1391485114
its simple. i copied one of the examples, tested it Notting happens. tested in the dev servers nothing happens. what i am doing wrong. right now my frustration is making me unable to write coherent things, that's the reason this post is short. so please how do i get one running. 1 create campaign 2 view details 3 API script 4 paste API (Bloddied Script API) 5 save script 6 launch campaign nothing on the console output page. nothing on the campaign page. <a href="http://www.youtube.com/watch?v=Mn713TcCgWA" rel="nofollow">http://www.youtube.com/watch?v=Mn713TcCgWA</a>
1391495024
DXWarlock
Sheet Author
API Scripter
What script is it? a script wont show anything in console without any log(whatever); in it. and it wont do anything in campaign unless its triggered by something.
1391514307

Edited 1391539956
The hello world example with the ready event wich should allways trigger the log. And the blodied token script wich should have visible effects on the token. I even tried dividing by 0 just to see if some error displayed. i just want to know if i am doing it right or if my account has some sort of bug. EDIT: tried it at work, and seems to be working, i guess its another case of my programer curse. i will update on this once i get home.
1391544479

Edited 1391544588
DXWarlock
Sheet Author
API Scripter
Hmm not sure, it should work. did you save the script, and make sure its enabled? try this one, it should say "Scripts loaded" when you hit save. if it doesnt something is really wrong. or your browser/addons aren't allowing you to click buttons. (had it on IE on a work PC, i could click the button but it wouldn't actually save). on('ready', function() { sendChat('', '/desc Scripts Loaded'); });
1391558313

Edited 1391558532
this marvellous thing works on my tablet but does not work on my personal computer. yep right on. the hate of the gods lays upon me. for i am forever cursed to be plagued by bugs on every piece of software i touch. off to support!
1391559028

Edited 1391559076
i invited a friend to join my campaing and to my surprise the script ran, wich means when i start the roll20 interface somehow my computer is not running the scripts. the problem lies in my computer joining the campaing. and not executing the scripts.
Whether or not the API runs shouldn't (in theory) depend on what computer you use. Our API sandbox server is what actually runs your API code and generates the response sent back to the console. (More on this here: <a href="https://wiki.roll20.net/API:Sandbox_Model" rel="nofollow">https://wiki.roll20.net/API:Sandbox_Model</a> ) However, the sandbox only runs when someone is actually in your game. So just to be sure you and I are on the same page, when you say it's not working on your computer, you have the API console in one window/tab, then you log into the campaign itself (in the game) in another tab/window, and nothing happens? But when you have the console open on your main computer and launch the game on a tablet, it does work? Or you are launching the console on a tablet as well?
1391602261

Edited 1391602399
well the test i have run have allways been with 2 windows. once containing the console output and the other running a roll20 client of the campaign. then based on this h have done the folowing. console output on main pc , roll20 client on main pc. =&gt; nothing happens. console output on alternate pc and client on alternate pc =&gt; the script displays the output with no problem. console output on tablet, and client on tablet =&gt; the script runs displays he output with no problem. console output on main pc and client on alternate pc =&gt; the scrip displays the output with no problem. just by discarding, i can see that the problems lies on my main pc client. something in it, if the scripts are run in the server side, then this thing is not letting it trigger the events, and this "thing" happens with firefox, chrome, and IE. i, again at work i can see it executes normaly.
ok i found the solution. keep it on your records. for future references. the problem lied in that my computer was set to another time-zone, i think it was gmt +1 and i am in gmt -4 this ocurred because my router was miss configured and had that gmt information set on it. as soon as i corrected my information both on router and on my pc. the script ran smoothly. so users have to make sure that their time zone is correctly configured. if they have a problem like mine. thank you for your support.
1391654610
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Undostrescuatro said: ok i found the solution. keep it on your records. for future references. the problem lied in that my computer was set to another time-zone, i think it was gmt +1 and i am in gmt -4 this ocurred because my router was miss configured and had that gmt information set on it. as soon as i corrected my information both on router and on my pc. the script ran smoothly. so users have to make sure that their time zone is correctly configured. if they have a problem like mine. thank you for your support. Just when I was not expecting an interesting problem... sorry for EVER doubting you (said in very a very friend tongue in cheek manner.)