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

API Working?

1396911789
Konrad J.
Pro
API Scripter
Anyone else having problems. I even created a whole new blank campaign. Save a scipt, but it doesn't say its doing anything and my script doesn't do anything. No errors, just nothing. :( I guess I'll go away from it for a few hours.
I'm getting the "infinite loop or long running process detected" message in the log, but no error message, and disabling all the scripts doesn't affect it in any way. Been trying for about an hour.
Try it now.
Working now, thanks!
No problem! Really wish I could figure out why it just needs to be given a kick once every 3 or 4 days...
Out of curiosity, I was using someone's bloody(< 1/2 hp and death marker) script on("change:graphic", function(obj) { log("Whoa"); if(obj.get("bar3_max") === "") return; if(obj.get("bar3_value") <= obj.get("bar3_max") / 2) { if (!obj.get("status_redmarker")) obj.set({ status_redmarker: true }); } else{ if (obj.get("status_redmarker")) obj.set({ status_redmarker: false }) } if(obj.get("bar3_value") <= 0) { if (!obj.get("status_dead")) obj.set({ status_dead: true }); } else { if (obj.get("status_dead")) obj.set({ status_dead: false }); } }); I added the checks for if (obj.get("whatever") just now. Prior to that it would just always re-set status_redmarker even if it was already set. Could this cause a endless loop? Or is the backend of the API intelligent enough to not call on ("change:graphic") if the value of a marker was set to the same thing? Occasionally I see this script spin out in an endless loop and it kills it, so I just added the checks. Could stuff like this cause API server issues?
1396935297
Lithl
Pro
Sheet Author
API Scripter
The API does not trigger events, so change:graphic wouldn't run even if the API changed it to something different.