Code: Select all
Roll {R=1d20}
Hit {RHit=if(R>=EnemyAC,1,0)}
AutoHit {RHit=if(R==20,1,RHit)}
For the above code assume that EnemyAC is either a token property that the GM is setting right before the macro is run OR that the user inputs. Whatever makes you happy.
THis is the error I get:
Could not execute the command: Invalid number of parameters 1, expected exactly 2 parameter(s)
It is directly linked to the last line of code, and, I presume, the inclusion of a variable in the FALSE parameter of the IF statement. I'm not sure why, I'm just passing a value of 1 or 0, trying to make sure that the previous value of RHit doesn't get lost. This was my way to get around the OR statement not working as expected (see my previous post).
So, halp?