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.

February 04 (11 years ago)

Edited February 04 (11 years ago)
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.


http://www.youtube.com/watch?v=Mn713TcCgWA
February 04 (11 years ago)
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.
February 04 (11 years ago)

Edited February 04 (11 years ago)
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.
February 04 (11 years ago)

Edited February 04 (11 years ago)
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');
});
February 04 (11 years ago)

Edited February 05 (11 years ago)
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!
February 05 (11 years ago)

Edited February 05 (11 years ago)
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.
February 05 (11 years ago)
Riley D.
Roll20 Team
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: https://wiki.roll20.net/API:Sandbox_Model ) 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?
February 05 (11 years ago)

Edited February 05 (11 years ago)
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.

  1. console output on main pc, roll20 client on main pc. => nothing happens.
  2. console output on alternate pc and client on alternate pc => the script displays the output with no problem.
  3. console output on tablet, and client on tablet => the script runs displays he output with no problem.
  4. console output on main pc and client on alternate pc => 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.
February 06 (11 years ago)
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.
February 06 (11 years ago)
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.)