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 .
×

Error when trying to use macros in multiple games

For about the last 8 hours I've had problems with my macros throwing out an error. Occured in 4 different games, on Firefox, Chrome and Opera. Normal 0 false false false false EN-GB X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin-top:0cm; mso-para-margin-right:0cm; mso-para-margin-bottom:8.0pt; mso-para-margin-left:0cm; line-height:107%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Aptos",sans-serif; mso-ascii-font-family:Aptos; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Aptos; mso-hansi-theme-font:minor-latin; mso-font-kerning:1.0pt; mso-ligatures:standardcontextual; mso-fareast-language:EN-US;} Chrome is telling me Cannot read properties of undefined (reading 'cache') Firefox is telling me can't access property "cache", X is undefined Which I'm guessing is two ways of saying the same thing. Everything was working fine a couple of days ago.
Hi there! Could you send me a private message with a link to the game that is experiencing this issue? We'll look into it ASAP!
1770503966

Edited 1770505037
Today's session for my group is experiencing the same issue. It seems that all the macros that include a targetting (such as attacks), is experiencing the same error messages. My Launch Game link is&nbsp; <a href="https://app.roll20.net/editor/setcampaign/9847935" rel="nofollow">https://app.roll20.net/editor/setcampaign/9847935</a> This happens in both Chrome and Firefox. More specifically, the character named Brenda Jersen, ability "CureCritical", and any other ability that included targeting. This affected everyone that was playing in today's session. It was so bad that we cut our session short because the game was getting very unenjoyable.
1770509454
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hey folks! Do the macros you are having issues with include Mod script calls? If so, are you running the experimental server?
I am having the same issues with my D&amp;D 3.5 campaign. All the attack macros have the same error, and the game is unplayable now as we mostly depend on macros for all the calculations. I am Plus member, so no Mod scripts at all. Before all was working fine. Interestingly, some of the macros created in the "Atributes &amp; Abilities" Tab work well, even if they are attack macros. I am not sure what is the cause, seems pretty random (as they have similar structure). But most which are related to attacks doesn't work now...
@keithcurtis no, no Mod script calls are in use. It's a D&amp;D 3.5 campaign, using a modified version of the character sheets. The Last modification was made many months ago, and everything has worked since. Last game session was a couple weeks ago, and was working fine then.
1770538619

Edited 1770538689
I use the ScriptCard API for the attack, healing etc, macros now, however I've tested it using the template built into the D&amp;D 4E Character Sheet and that has the same problem. I've created a brand new game and transmogrified a character into it, I've even created a new character and copied the macro into that.&nbsp; Until I stripped everything linked to targeting out (@{target|token_name}, @{target|ac} etc) out the error kept coming up.&nbsp; Only when everything to do with targeting was removed did the macro work Not sure what is meant by experimental server, I just run the games as normal on Jumpgate. Interestingly i have a releatively new 13th Age game that uses the same ScriptCard macro adapted for 13th Age and that is currently working fine even though it does include the targeting.
1770541101

Edited 1770541245
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Oenanthe said: Not sure what is meant by experimental server, I just run the games as normal on Jumpgate. When your scripts launch at startup, they launch in a "sandbox", a dedicated room where your scripts can run and interact with your game data, but with protections so they don’t accidentally interfere with Roll20 itself or other games. That isolation also means some typical JavaScript features (like loading external libraries or making web requests) are blocked for safety reasons. There are two "flavors" of sandbox, the Default and the Experiemental. The&nbsp; Default &nbsp;sandbox is fairly stable, but is more or less frozen in terms of development. Newer features are being added to Roll20 all the time, and the Sandbox needs to evolve so that these features can benefit from scripting. The Experimental sandbox has actually been around for a couple of years now, and is fairly mature. But some things (for example reading Beacon-based sheets, which might be related to what is throwing that error) can only work there. You can change which server you are on on your mod script page. Just choose from the drop down, wait about 30 seconds and then press the restart button. You can always switch back, but in general, you would never notice the difference as an end user, only that some newer, or newly updated scripts will function better.
I would say I'm 99% certain I'm on the default option. My computer knowledge is virtually non existant, I can use what is in front of me, and have learnt to use the APIs with a lot of help from other users.&nbsp; I just go into the Mod (API) Script option in Settings, and pick what I want from the drop down menu there.
I do not think it is related to the targeting function. I have some macros in the same D&amp;D 3.5 game which work, and some which bring the error, and both have targeting. For example, this one brings the error (called from the attack button): /w gm &amp;{template:DnD35Attack} {{npcflag=true}} {{fullattackflag=[[d1]]}} {{name=Yuan-ti Cleric}} {{subtags=attacks at @{target|victim|token_name} (AC@{target|victim|bar2}) and tries to dodge against @{target|dodge|token_name} }} {{attack1=His mwk greatsword hits an AC[[1d20cs&gt;19+@{npcbaseatt}+@{npcstr-mod}+@{npcsize}-?{Dodge AC bonus|0|1|2|3|4|5}+1[Mwk]]] }} {{damage1= and deals [[2d6+@{npcstr-mod}+floor(@{npcstr-mod}/2) ]] dmg}} {{attack2=OR}} {{damage2= }} {{attack3=His ranged dagger atk hits an AC[[1d20cs&gt;19+@{npcbaseatt}+@{npcdex-mod}+@{npcsize}-?{Dodge AC bonus}]] }} {{damage3= and deals [[1d4+@{npcstr-mod}]] dmg}}&nbsp; {{notes= SR 16. Dodge AC bonus: +?{Dodge AC bonus} until next round. }} And this one works perfectly without issues (called from the attributes and abilities tab): /w gm &amp;{template:DnD35Attack} {{npcflag=true}} {{fullattackflag=[[d1]]}} {{name=Yuan-ti Cleric}} {{subtags=smites at @{target|victim|token_name} (AC@{target|victim|bar2}) and tries to dodge against @{target|dodge|token_name} }} {{attack1=His mwk greatsword hits an AC[[1d20cs&gt;19+@{npcbaseatt}+@{npcstr-mod}+@{npcsize}-?{Dodge AC bonus|0|1|2|3|4|5}+1[Mwk]+4[Smite] ]] }} {{damage1= and deals [[2d6+@{npcstr-mod}+floor(@{npcstr-mod}/2)+@{divinecasterlevel} ]] dmg}} {{notes= SR 16. Dodge AC bonus: +?{Dodge AC bonus} until next round. }} Any clues?
Joan F. said: I do not think it is related to the targeting function. I have some macros in the same D&amp;D 3.5 game which work, and some which bring the error, and both have targeting. For example, this one brings the error (called from the attack button): /w gm &amp;{template:DnD35Attack} {{npcflag=true}} {{fullattackflag=[[d1]]}} {{name=Yuan-ti Cleric}} {{subtags=attacks at @{target|victim|token_name} (AC@{target|victim|bar2}) and tries to dodge against @{target|dodge|token_name} }} {{attack1=His mwk greatsword hits an AC[[1d20cs&gt;19+@{npcbaseatt}+@{npcstr-mod}+@{npcsize}-?{Dodge AC bonus|0|1|2|3|4|5}+1[Mwk]]] }} {{damage1= and deals [[2d6+@{npcstr-mod}+floor(@{npcstr-mod}/2) ]] dmg}} {{attack2=OR}} {{damage2= }} {{attack3=His ranged dagger atk hits an AC[[1d20cs&gt;19+@{npcbaseatt}+@{npcdex-mod}+@{npcsize}-?{Dodge AC bonus}]] }} {{damage3= and deals [[1d4+@{npcstr-mod}]] dmg}}&nbsp; {{notes= SR 16. Dodge AC bonus: +?{Dodge AC bonus} until next round. }} And this one works perfectly without issues (called from the attributes and abilities tab): /w gm &amp;{template:DnD35Attack} {{npcflag=true}} {{fullattackflag=[[d1]]}} {{name=Yuan-ti Cleric}} {{subtags=smites at @{target|victim|token_name} (AC@{target|victim|bar2}) and tries to dodge against @{target|dodge|token_name} }} {{attack1=His mwk greatsword hits an AC[[1d20cs&gt;19+@{npcbaseatt}+@{npcstr-mod}+@{npcsize}-?{Dodge AC bonus|0|1|2|3|4|5}+1[Mwk]+4[Smite] ]] }} {{damage1= and deals [[2d6+@{npcstr-mod}+floor(@{npcstr-mod}/2)+@{divinecasterlevel} ]] dmg}} {{notes= SR 16. Dodge AC bonus: +?{Dodge AC bonus} until next round. }} Any clues? Interesting, since I don't use target off of attributes and abilities for npc monsters I would not have noticed that.&nbsp; But I can grab what does not work from the chat line, make it an ability off of a character, and it works. That unfortunately does not help me at all though as all of my setups use just tokens and macros that run out of the bubbles of the token. If this is not resolved it breaks most everything I do currently. And as you see in my post it only affects my Jumpgate games and not the "Legacy." This fails in Jumpgate but works in a Legacy but will work as an ability off of a character in Jumpgate. The bones attack @{target|token_name}&nbsp; with a [[1d20+9]] for [[1d4+1]] damage. If hit, roll a Will Save. <a href="https://app.roll20.net/forum/post/12667119/at-%7Btarget-token-name%7D-failing-in-jumpgate" rel="nofollow">https://app.roll20.net/forum/post/12667119/at-%7Btarget-token-name%7D-failing-in-jumpgate</a>
1770575928
Gold
Forum Champion
Erich S. said: This fails in Jumpgate but works in a Legacy but will work as an ability off of a character in Jumpgate. The bones attack @{target|token_name}&nbsp; with a [[1d20+9]] for [[1d4+1]] damage. If hit, roll a Will Save. Not much help, but I just tested THAT macro in my Jumpgate game, from the chat command-line, and it works as expected.&nbsp;
I have a distinct feeling that this is one of those problems that occurs sometimes and not others. All of my D&amp;D 4E games are effected, but my 13th Age game, which I just copied the macro into and made a few adjustments works fine. My guess (and it is no more than that as I dont' know computer programs) is that while the @{target|...} is part of the problem, triggering the error, it isn't the whole of the problem, there is something deeper that is going wrong that we can't see. From what I've worked out, macros that don't involve targets work all the tiem, but those that do fail most of the time, but not all of it.&nbsp; Browser and APIs don't seem to make any difference. Hopefully it is something that the Devs can track down quickly next week.
Gold said: Erich S. said: This fails in Jumpgate but works in a Legacy but will work as an ability off of a character in Jumpgate. The bones attack @{target|token_name}&nbsp; with a [[1d20+9]] for [[1d4+1]] damage. If hit, roll a Will Save. Not much help, but I just tested THAT macro in my Jumpgate game, from the chat command-line, and it works as expected.&nbsp; That is helpful, Gold, in that I tried it in my game from the chat command-line and it did work. Just like the information that Joan F game: it helps narrow the symptom down.&nbsp; But I've been using it for ten or so years by putting it into the token bars and calling it with&nbsp;/desc @{selected|bar1}.&nbsp; That still gives an error. I tried removing the /desc but no change. And this problem only affects my Jumpgate games, and not "Legacy." It worked fine on 3 Feb but began giving an error on 5 Feb. Seeing it is not just affecting me I would guess a change was made sometime in that time interval that affected Jumpgate.&nbsp;&nbsp;
Can anyone who is having this issue please send me a private message with a link to the game that’s being affected? That will really help us look into this, because we’ve not been able to reproduce the issue ourselves as of yet. We think we have a fix which we plan to release tomorrow, but it would be good to have a game where we can verify it is happening pre-fix, and isn’t happening post-fix.&nbsp;
Mike T. said: Can anyone who is having this issue please send me a private message with a link to the game that’s being affected? Message sent.
Erich S. said: Joan F. said: I do not think it is related to the targeting function. I have some macros in the same D&amp;D 3.5 game which work, and some which bring the error, and both have targeting. For example, this one brings the error (called from the attack button): /w gm &amp;{template:DnD35Attack} {{npcflag=true}} {{fullattackflag=[[d1]]}} {{name=Yuan-ti Cleric}} {{subtags=attacks at @{target|victim|token_name} (AC@{target|victim|bar2}) and tries to dodge against @{target|dodge|token_name} }} {{attack1=His mwk greatsword hits an AC[[1d20cs&gt;19+@{npcbaseatt}+@{npcstr-mod}+@{npcsize}-?{Dodge AC bonus|0|1|2|3|4|5}+1[Mwk]]] }} {{damage1= and deals [[2d6+@{npcstr-mod}+floor(@{npcstr-mod}/2) ]] dmg}} {{attack2=OR}} {{damage2= }} {{attack3=His ranged dagger atk hits an AC[[1d20cs&gt;19+@{npcbaseatt}+@{npcdex-mod}+@{npcsize}-?{Dodge AC bonus}]] }} {{damage3= and deals [[1d4+@{npcstr-mod}]] dmg}}&nbsp; {{notes= SR 16. Dodge AC bonus: +?{Dodge AC bonus} until next round. }} And this one works perfectly without issues (called from the attributes and abilities tab): /w gm &amp;{template:DnD35Attack} {{npcflag=true}} {{fullattackflag=[[d1]]}} {{name=Yuan-ti Cleric}} {{subtags=smites at @{target|victim|token_name} (AC@{target|victim|bar2}) and tries to dodge against @{target|dodge|token_name} }} {{attack1=His mwk greatsword hits an AC[[1d20cs&gt;19+@{npcbaseatt}+@{npcstr-mod}+@{npcsize}-?{Dodge AC bonus|0|1|2|3|4|5}+1[Mwk]+4[Smite] ]] }} {{damage1= and deals [[2d6+@{npcstr-mod}+floor(@{npcstr-mod}/2)+@{divinecasterlevel} ]] dmg}} {{notes= SR 16. Dodge AC bonus: +?{Dodge AC bonus} until next round. }} Any clues? Interesting, since I don't use target off of attributes and abilities for npc monsters I would not have noticed that.&nbsp; But I can grab what does not work from the chat line, make it an ability off of a character, and it works. That unfortunately does not help me at all though as all of my setups use just tokens and macros that run out of the bubbles of the token. If this is not resolved it breaks most everything I do currently. And as you see in my post it only affects my Jumpgate games and not the "Legacy." This fails in Jumpgate but works in a Legacy but will work as an ability off of a character in Jumpgate. The bones attack @{target|token_name}&nbsp; with a [[1d20+9]] for [[1d4+1]] damage. If hit, roll a Will Save. <a href="https://app.roll20.net/forum/post/12667119/at-%7Btarget-token-name%7D-failing-in-jumpgate" rel="nofollow">https://app.roll20.net/forum/post/12667119/at-%7Btarget-token-name%7D-failing-in-jumpgate</a> Thank you, Erich. Your comments are indeed valuable! I just realized that in my old "Legacy" games, the same macros work perfectly. Seems only in the new Jumpgate something breaks them. In my case, the macros which fail are called from the sheet dice buttons, or from the upper token button assigned to the selected token which calls them. If I copy/paste any of these macros onto the chat command-line, even if I select the token before pressing the SEND button, it gives a bunch of errors such as "No character was found for 'npcstr-mod'" for all the attributes used in the macro...
All my games got upgraded to Jumpgate, so I can't test whether the macros would work in games on the Legacy engine.
So I just had a weirdness happen. In my games, I have "Adventures in D'nal" (which is my normal campaign), and "Adventures in D'nal Copy" which was a duplicate I made several months ago before updating my current campaign to Jumpgate. When I went into the copy, the map page that came up was the page that was currently active in the campaign, and it had all the tokens in the same position and states as from the current campaign page. Mind you, this map didn't exist at the time that I made the copy. I tested the malfunctioning macros in the copied campaign, and the worked fine. I relauched the current campaign VTT, and the macros are working there now too. Something else that's weird is that the Turn Order in both campaign VTTs are identical except the characters that are in the current campaign but not in the copy are gone from the Turn Order window. A bunch of the Handouts that had been added to the current campaign since the copy are showing up in the copy campaign, but not all of them, as if there was some kind of mirroring process running in the background, and the Edit button doesn't exist for any of the Handouts in the copy.
Adam K. said: So I just had a weirdness happen. In my games, I have "Adventures in D'nal" (which is my normal campaign), and "Adventures in D'nal Copy" which was a duplicate I made several months ago before updating my current campaign to Jumpgate. When I went into the copy, the map page that came up was the page that was currently active in the campaign, and it had all the tokens in the same position and states as from the current campaign page. Mind you, this map didn't exist at the time that I made the copy. I tested the malfunctioning macros in the copied campaign, and the worked fine. I relauched the current campaign VTT, and the macros are working there now too. Something else that's weird is that the Turn Order in both campaign VTTs are identical except the characters that are in the current campaign but not in the copy are gone from the Turn Order window. A bunch of the Handouts that had been added to the current campaign since the copy are showing up in the copy campaign, but not all of them, as if there was some kind of mirroring process running in the background, and the Edit button doesn't exist for any of the Handouts in the copy. Check the game's details page. The update has gone through and appears to be working on most of my games, but the one I sent them a link to, is no longer my game.&nbsp; Its come back as created by one of the devs, not me, meaning I can't access anything I should be able to.
I can happily say that the problem that persisted from the 5th through yesterday is now resolved: my macros are now working correctly. Adama K.: I've never seen that before but perhaps Roll20 rolled back to an earlier saved state to fix our problem and that is a side effect? Not sure. I've not experienced that one before.
1770691436

Edited 1770691570
Gold
Forum Champion
Adam K. said: So I just had a weirdness happen. In my games, I have "Adventures in D'nal" (which is my normal campaign), and "Adventures in D'nal Copy" which was a duplicate I made several months ago before updating my current campaign to Jumpgate. When I went into the copy, the map page that came up was the page that was currently active in the campaign, and it had all the tokens in the same position and states as from the current campaign page. Mind you, this map didn't exist at the time that I made the copy.&nbsp; I have never seen "that" happen on Roll20 before. (Where data from 1 game was actually existing and appearing in another game).&nbsp; The only times I've seen something like that happen, it was ultimately some confusion where the wrong game had loaded (whether user misclick or something wrong on Roll20's end), not the one you thought you were looking at.&nbsp; I would say refresh your browser and check it again on that. Be sure to load your Old Backup game from its own Game Details page &gt; Launch Game button.&nbsp; If it is confirmed, report it to Roll20 Help Center.
Erich S. said: I can happily say that the problem that persisted from the 5th through yesterday is now resolved: my macros are now working correctly. Adama K.: I've never seen that before but perhaps Roll20 rolled back to an earlier saved state to fix our problem and that is a side effect? Not sure. I've not experienced that one before. Yes, I tried today and all the macros are working fine again as they should. Thanks for the quick resolving!
I don't know about anyone else, but I'm still having problems when pull a stat from a target's character sheet. @{target|Enemy1|token_name} works fine. But @{target|Enemy1|ac} doesn't. It asks me for target: Enemy1, and then for target.&nbsp; It is the second, target only option that it actually pulls the ac from. The same is true for Strength Modifier, and I'm guessing other attributes on the target's character sheet.
Oenanthe said: I don't know about anyone else, but I'm still having problems when pull a stat from a target's character sheet. @{target|Enemy1|token_name} works fine. But @{target|Enemy1|ac} doesn't. It asks me for target: Enemy1, and then for target.&nbsp; It is the second, target only option that it actually pulls the ac from. The same is true for Strength Modifier, and I'm guessing other attributes on the target's character sheet. If I am not wrong, in the 3.5 D&amp;D sheet the AC attribute always brought issues when tried to call it (it's not something new). To solve the problem, I usually use&nbsp; @{target|enemy|bar2}&nbsp; (where the bar2 is the assigned AC of the token). Other attributes I have not tried, because normally for targets I do not need to call those. Until now, with all my macros I have not experienced any further errors.
Joan F. said: Oenanthe said: I don't know about anyone else, but I'm still having problems when pull a stat from a target's character sheet. @{target|Enemy1|token_name} works fine. But @{target|Enemy1|ac} doesn't. It asks me for target: Enemy1, and then for target.&nbsp; It is the second, target only option that it actually pulls the ac from. The same is true for Strength Modifier, and I'm guessing other attributes on the target's character sheet. If I am not wrong, in the 3.5 D&amp;D sheet the AC attribute always brought issues when tried to call it (it's not something new). To solve the problem, I usually use&nbsp; @{target|enemy|bar2}&nbsp; (where the bar2 is the assigned AC of the token). Other attributes I have not tried, because normally for targets I do not need to call those. Until now, with all my macros I have not experienced any further errors. That unfortunately doesn't work in D&amp;D 4E.&nbsp; What were saves in 3.5 became Defenses in 4E, so attacks can be made against AC, Fort, Ref or Will, so each would need its own bubble, I would then need a bubble for HP, Healing Surges, and Temporary Hit Points. I've just tested a monster macro that can attack two different targets and that doesn't work at the moment, it brings up the names of Enemy1 and Enemy 2, but the AC just links to a third target called Target.&nbsp; As I use Scriptcards I can break the AC down and add it up in the card, but that doesn't work as I can't call the differenct attributes for the two different Enemies either.
1770840746
Gauss
Forum Champion
Ok, so I did some digging and the problem is that the attribute "armorclass" (not AC) is a calculated attribute. It isn't being pushed to another attribute.&nbsp; There does not appear to be an "AC" attribute.&nbsp; Since it is a calculated attribute and we are bypassing the sheetworker doing the calculation you need to wrap it in inline brackets if you are going to call it. [[@{target|armorclass}]] But that creates a problem. When you call it twice if calls it three times and outputs the last result twice. I don't know why it is doing that, it doesn't do that on other sheets and it isn't doing it in the Legacy VTT engine.&nbsp; I have forwarded the bug to the Devs, but in the meantime you can at least call a single target using&nbsp;[[@{target|armorclass}]]
1770844046

Edited 1770845304
Gauss said: Ok, so I did some digging and the problem is that the attribute "armorclass" (not AC) is a calculated attribute. It isn't being pushed to another attribute.&nbsp; There does not appear to be an "AC" attribute.&nbsp; Since it is a calculated attribute and we are bypassing the sheetworker doing the calculation you need to wrap it in inline brackets if you are going to call it. [[@{target|armorclass}]] But that creates a problem. When you call it twice if calls it three times and outputs the last result twice. I don't know why it is doing that, it doesn't do that on other sheets and it isn't doing it in the Legacy VTT engine.&nbsp; I have forwarded the bug to the Devs, but in the meantime you can at least call a single target using&nbsp;[[@{target|armorclass}]] It isn't the AC that is the problem it is the targing option. The problem is the same if you target @{target|Enemy1|Strength} @{target|ac} works if you only have one enemy, the problem isn't the AC call its to do with trying to call it from multiple opponents if you make 2 or more attacks. @{target|Enemy1|ac} and @{target|Enemy2|ac} used to work, now it doesn't, it askes for a third target just callted 'target' and uses that targets AC. I’ll also add that it is ac not armourclass as I’m using the 4E sheet not 5E.
1770847330

Edited 1770847487
Gauss
Forum Champion
I was responding to Joan's 3.5 sheet post.&nbsp; Still, I did note the 3rd target issue (also applies to the 3.5e by Diana sheet) and I have brought it up with the Devs.&nbsp;
Gauss said: I was responding to Joan's 3.5 sheet post.&nbsp; Still, I did note the 3rd target issue (also applies to the 3.5e by Diana sheet) and I have brought it up with the Devs.&nbsp; Sorry, with all the relevant posts which deal with different systems I got confused.&nbsp; I'd also just finished trying to run a game and the issue was at the front of my mind. I had messaged Mike T about it, and he is passing my new error on to the devs as well.
Gauss said: I was responding to Joan's 3.5 sheet post.&nbsp; Still, I did note the 3rd target issue (also applies to the 3.5e by Diana sheet) and I have brought it up with the Devs.&nbsp; Thanks for the hint, Gauss. I will take note on that. :)
1772674900

Edited 1772674934
Gauss
Forum Champion
Hi Joan, can you check to see if your issue is resolved? (the target issue having an extra target) I believe it should be fixed now.&nbsp;