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

Group Check / Apply Damage Error

I've finally started digging deeper into macros and using the API and im running into an issue I can't solve. I think it is specifically with the apply damage script addition to Group Check found here . I'm getting the following error in my API. ReferenceError: playerIsGm is not defined at apiscript.js:3520:32 I've tried playing around with the code based on my basic understading but just amending / removing that part just created more errors. Any help would be appreciated. My ultimate aim is to roll the apply damage script into a wider macro that allows me to choose the check and then easily apply damage with a macro similar to the below. I'm assuming the issue is with the script and not the macro's given I've tried using the one linked in the thread but perhaps I'm missing something. !group-check {{ --hideformula --?{Output|Public,public|Whisper,whisper} --?{Ability Save|Strength,Strength Save|Dexterity,Dexterity Save|Constitution,Constitution Save|Intelligence,Intelligence Save|Wisdom,Wisdom Save|Charisma,Charisma Save} --ro ?{Roll Type|Normal,roll1|Advantage,adv|Disadvantage,dis} --subheader vs DC ?{DC} --process --button ApplyDamage !apply-damage ~dmg [[?{Damage}]] ~type ?{Damage on Save|Half,half|None,none} ~DC ?{DC} ~saves RESULTS(,) ~ids IDS(,) }}
Hello, I am super new to this and have been trying to get it to work. I wonder if the macro on page 4 of the link would work for you. It did for me.  I wish it gave the defender the correct marker though, instead of half heart for fail, so it's maybe not 100% perfect but does pretty good. Maybe you know how to fix it? !group-check {{ --?{Ability Save|Strength,Strength Save|Dexterity,Dexterity Save|Constitution,Constitution Save|Intelligence,Intelligence Save|Wisdom,Wisdom Save|Charisma,Charisma Save} --ro ?{Roll Type|Normal,roll1|Advantage,adv|Disadvantage,dis} --process --subheader vs DC ?{DC} --button ApplyDamage !apply-damage ~dmg [[?{Damage|0}]] ~type ?{Damage on Save|Half,half|None,none} ~DC ?{DC} ~saves RESULTS(,) ~ids IDS(,) ?{Status| None,~| Red,~status red| Blue,~status blue| Green,~status green| Orange,~status orange| Purple,~status purple| Pink,~status pink| Yellow,~status yellow| ―, | Concentrating,~status blue| Readying,~status stopwatch| ―, | Prone,~status back-pain| Restrained,~status fishing-net| Grappled,~status grab| ―, | Incapacitated,~status interdiction| Stunned,~status pummeled| Unconscious,~status sleepy| ―, | Charmed,~status chained-heart| Frightened,~status screaming| ―, | Poisoned,~status half-heart| Blinded,~status bleeding-eye| Deafened,~status lightning-helix| Paralyzed,~status padlock| Petrified,~status broken-skull| ―, | Dodging,~status bolt-shield| Cover (half),~status broken-shield:2| Cover (three-quarters),~status broken-shield:5| Cover (full),~status white-tower| Invisible,~status ninja-mask| ―, } }}
1587662335
Nick O.
Forum Champion
ReferenceError: playerIsGm is not defined at apiscript.js:3520:32 This looks like a case-sensitivity issue - in the javascript, try changing playerIsGm to playerIsGM  and see if that fixes it for you.
Anyone else have issues with this macro taking AGES to run? It takes up to 60 seconds sometimes.