Problems with Forms Tutorial

Discuss macro implementations, ask for macro help (to share your creations, see User Creations, probably either Campaign Frameworks or Drop-in Resources).

Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice

Post Reply
Templar
Cave Troll
Posts: 65
Joined: Wed Sep 20, 2017 9:24 pm

Problems with Forms Tutorial

Post 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
Templar

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Problems with Forms Tutorial

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

Templar
Cave Troll
Posts: 65
Joined: Wed Sep 20, 2017 9:24 pm

Re: Problems with Forms Tutorial

Post 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
Templar

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: Problems with Forms Tutorial

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

Templar
Cave Troll
Posts: 65
Joined: Wed Sep 20, 2017 9:24 pm

Re: Problems with Forms Tutorial

Post 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
Templar

Post Reply

Return to “Macros”