Page 1 of 1

Problems with Forms Tutorial

Posted: Tue Oct 10, 2017 2:48 pm
by Templar
Hi All,

I have been trying to learn frames so have been going through this Introduction:
http://www.lmwcs.com/rptools/wiki/Intro ... and_Frames

As far as I can see I have created all the required macros and Campaign Properties.

Strength (Str)
Dexterity (Dex)
Constitution (Con)
Intelligence (Int)
Wisdom (Wis)
Charisma (Char)
*@HP
*@AC
*@MaxHP
*@XP
*@NextLevelXP
Weapons
Items

When I run the Charsheet pointer macro from the target token the sheet opens just fine.
but when I click the Main hyperlink at the top of the sheet I get this:
Error executing "getProperty": there is no impersonated token.

When I click the Main hyperlink at the top of the sheet I get this:
   Invalid condition in IF(isPropertyEmpty("Weapons")) roll option.       Statement options (if any): h,if(isPropertyEmpty("Weapons"))       Statement Body : Weapons = "NumWeapons=0;"

Also if I try the AddWeapon Macro I get the Add Weapon Dialog just fine but if I fill it out and hit save I get a "Value for weapons" dialog box.

If I put a number in there I get :- "setStrProp()" requires exactly 1 parameters.

Any thoughts?
Templar

Re: Problems with Forms Tutorial

Posted: Tue Oct 10, 2017 3:39 pm
by aliasmask
Make sure the macro button config has "apply to selected" checked. isPropertyEmpty error could also be an impersonation problem if either the token it's looking at doesn't have that prop or if there is no currentToken() set. setStrProp error could be a permissions thing where you don't have permission to write to token.

Re: Problems with Forms Tutorial

Posted: Wed Oct 11, 2017 12:51 am
by Templar
Hi,
Thanks for that but I don't actually think thats it.

I set every macro to "apply to selected" with no change in result.

Also I am connected as GM and the AddWeapon Macro does put "NumWeapons=1" in the Tokens Weapons property but not the weapon name, damage, and bonus

Templar

Re: Problems with Forms Tutorial

Posted: Thu Oct 12, 2017 8:19 am
by wolph42
well the error is:
Invalid condition in IF(isPropertyEmpty("Weapons"))
and as isPropertyEmpty returns either true or false, which works with an IF statement, that means that it is NOT returning either of these. That means that it most likely returns an error, that means that:
isPropertyEmpty("Weapons")
doesn't work. This can have several causes, the most likely is the one that AM mentioned. So apparently either there is
1. no token in context or
2. no property 'Weapons' defined on the token in context
(or both).
to check
1. use Wiki: currentToken() e.g. in [broadcast(currentToken())]
2. use Wiki: getAllPropertyNames() again in e.g. [broadcast(getAllPropertyNames())]
in the macro.

Re: Problems with Forms Tutorial

Posted: Sat Oct 14, 2017 6:48 am
by Templar
Hi,

Thank you all for your help.
In the end I fixed this after reading this section:
"Don't forget the token context"
Obviously the selected token gets lost when you use macroLink() and macroLinkText().

Templar