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] Edits to TurnMarker1 script not taking affect

I added the TurnMarker1 script to my campaign and now I need to make some adjustments to the script, but my changes aren't being reflected. Most of the stuff can be toggled in game, but I want to change the size of the turn marker token, which isn't an in game option. In the script, I changed the scale value to 1.2, but it had no affect. I made a copy of the campaign and loaded the edited script there and it worked. I then tried editing other values and again, nothing changed. I feel like I'm missing something obvious as I am new to the API and scripts.
I either figured out a work around or the correct way to edit scripts. Like I said, I'm new to the API feature, so this may have been common knowledge. Either way, I found if I replaced all instances of "TurnMarker" with "TurnMarker2", my edits worked. It's like it tricked the API into thinking it's a new edited script, rather than using a cached version.
1523899644
The Aaron
Pro
API Scripter
Yeah, this is a quirk in the way I wrote TurnMarker1.  It stores those settings in the state object so once it executes, they aren't referenced from the script afterwards... I really should fix that (and a bunch of other things).  The way you can get them to stick is by changing the schemaVersion to something else, which forces it to rewrite the state entries.  Your fix worked because you changed the name of the state location, which caused it to write a new entry, but if you make another change, you'd find yourself in the same boat again.