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

Door Control for Players Question

So, the first time I made a door it worked perfectly. Then I unlinked them so I could duplicate the process and now I keep getting the same message over and over. I've tried deleting everything and starting over, etc. but I just keep getting the same message. Here is what I am selecting: These are the tokens: Anyone know what happened? Not sure why it would work the first time and then never again?
1497999661
The Aaron
Pro
API Scripter
Does the issue persist if you restart the API?  Also, what command are you running?
take the '  out of the names of your tokens. The script is looking for Switch and Door - I don't know if it strips the ' out - but the doors work for me , and I don't put the quote marks in.
1498007523
The Aaron
Pro
API Scripter
Great catch!!!
Drew T. said: take the '  out of the names of your tokens. The script is looking for Switch and Door - I don't know if it strips the ' out - but the doors work for me , and I don't put the quote marks in. Thanks, this was the fix! Not sure why it worked the first time with them in there though? Anyway, off to populate my map with beautiful, beautiful door traps.
Hey again, I'm now having a problem where after I link the doors the switch no longer has token status so I can't set locks or traps. When I try to add the attributes to the switch token before linking them..It doesn't allow me to link them... just keeps telling me to "Select a graphic named 'Switch', a graphic named 'Door' and a path to use as a wall."
1502833287
The Aaron
Pro
API Scripter
Is the switch on the object layer? (sounds like it might be on the map layer?)
Nope, It is definitely on the object layer.
So, either way I do the linking, when I link them either, 1) before the attriubutes are defined, I can't go back and change the attributes and the switch is no longer recognized as a token or 2) if the attributes were defined prior to linking they are erased and the switch is no longer recognized as a token. The !OpenDoor and !CloseDoor are the only player commands that are definitely working correctly, but since all the other data disappears upon linking or I can't enter it after linking nothing else does. I'm getting this error in the API output: ERROR: You cannot set the imgsrc or avatar of an object unless you use an image that is in your Roll20 Library. See the API documentation for more info." Perhaps, I'm not realizing what this means, but the tokens I am using are in my Roll20 Library... Sorry for being such a API newb. Appreciate the time you guys put in to these.
1503691604
The Aaron
Pro
API Scripter
No worries.  You can mostly ignore that error.  It has to do with the default value for images not being a valid url.  It isn't really an error. If you want to PM me a join link and GM me, I can try and figure out the issue directly.