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

Cannot view anything on the tabletop

Hi all, I was working on my script for the movement tracker, and I added a code to create a graphic to locate pins. I got an error (minor, trying to pull a get from an object with no properties) and suddenly everything on my tabletop is hidden! Its across every page too! I tried restarting my computer to see if it was the problem, but to no avail. I dont know how to fix this, but its hidden my entire campaign. Has anyone else experienced this?
1415478901
Pat S.
Forum Champion
Sheet Author
Did you remove the script then flush you cache? <a href="https://wiki.roll20.net/Solving_Technical_Issues#S" rel="nofollow">https://wiki.roll20.net/Solving_Technical_Issues#S</a>... Can you post a console log when you are in the tabletop also?
1415484372
The Aaron
Roll20 Production Team
API Scripter
Usually that happens if you have something invalid in one of your objects. Often setting the layer to 'token' instead of 'objects', but I've seen it happen with other things as well. Here's the script I give people to fix that: on('ready',function(){ 'use strict'; var validLayers=["gmlayer", "objects", "map", "walls"]; _.each(findObjs({ type: 'graphic', subtype: 'token' }), function(t){ if(!_.contains(validLayers,t.get('layer'))) { t.set({layer: 'objects'}); } }); }); I've considered writing an expanded version that checks every object's properties for invalid settings, but since this is almost always the problem, I haven't gotten around to it...
Bingo! Both solved it. Also, its been a while since i scripted, and i set an object to the token level...
1415488596
Pat S.
Forum Champion
Sheet Author
Good to hear it is fixed.
1415502171
The Aaron
Roll20 Production Team
API Scripter
Cheers!
Ok, weird quick. Now the API wont work at all. Even if I disable all scripts, then clear out my cache. Nothing. Scripts done run (I did the above script by itself, with a simple log(validLayers); to get it to show something if it is running, and nothing. No error, no log report. Odd.
I deleted all of them, and resinstalled one that had been working for a long time, and never gave me a problem, and its not working (HP change announcer)... Did I break the API?
1415511140

Edited 1415511151
Gauss
Forum Champion
I suggest creating a new campaign and testing if the API works there. If it does then there is probably a problem with your (current) campaign.
I completely deleted every script I had on the server. Then I added one I know works. I tested it on a blank server and it worked fine. Why wouldnt it work on my other campaign?
1415513435

Edited 1415513501
Gauss
Forum Champion
You campaign might have gotten damaged due to the API script error. Please try to copy the campaign and test out an API script that is known to work on the copy. As a sidenote, it would be a good idea for you to maintain a backup of your campaign when testing new scripts. This way if the script breaks your campaign you do not have this kind of a problem.