-
November 13th, 2013, 21:37 #1
Trouble with button_stringcycler...
I am trying to add a cycle button to a variant of the 3.5 skill tab.
Pulling out the 'class skill' button and replacing it with one that has 4 settings for the 'type' of skill.
In Champions there are 4 types of skills:
Untrained - 6 or less
Familiar Skills - 8 or less
Background Skills - 11 + ranks or less
Trained Skills - 9 + stat/5 + ranks or less
Code:<button_checkbox name="state"> <bounds>22,8,12,12</bounds> <script> function onValueChanged() CharManager.updateSkillPoints(window.getDatabaseNode().getChild("...")); end </script> </button_checkbox>-->
Code:<cycler_charskilltype name="state"> <bounds>22,2,12,20</bounds> <script> function onValueChanged() window.onStatUpdate(); -- I realize this is all wrong.. but I'm still working on this script... suggestions here would help. end </script> </cycler_charskilltype>
Code:<template name="cycler_charskilltype"> <button_stringcycler> <parameters> <labelsres>utr|fam|bg|tr</labelsres> <values>untrained|familiarity|background|trained</values> </parameters> </button_stringcycler> </template>
Code:Script Error: [string "common/scripts/button_stringcycler.lua"]:251: bad argument #1 to 'setValue' (number expected, got string)
Last edited by Blackfoot; November 13th, 2013 at 21:40.
Full License Operator - You must have a 'Lite' License to play in my games.
Member and GM in the Fantasy Grounds Pathfinder Society Group.
PFS Fantasy Grounds Forum
FG Community Teamspeak Server: ts.fg-con.com
Interested in Custom Character Portraits and Tokens? Contact me.
-
November 14th, 2013, 00:57 #2
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,561
The stringcycler control is attempting to write the string value of the next value in the cycle to the node with the same name as the stringcycler control. However, the error message is stating that the underlying control has the "number" data type, which means that it is being set as a number somewhere else.
* Check for other fields/controls with the same name.
* Check for number_linked/number_modifier fields which attempt to update when this field changes. For those field templates, they automatically create a number field to link to, unless you specify string. (See common/scripts/number_linked.lua in the CoreRPG ruleset; specifically the onInit and addSource functions) Also, the 3.5E ruleset has an example for the "number_charweapondamagetotal" template and the "number_charweaponattacktotal" template.
* If you don't find anything with those two hints, it's probably in some Lua script code with a createChild or DB.setValue call.
Cheers,
JPG
-
November 14th, 2013, 19:41 #3
My cycler is working spiffily now, thanks again for the assist!
Full License Operator - You must have a 'Lite' License to play in my games.
Member and GM in the Fantasy Grounds Pathfinder Society Group.
PFS Fantasy Grounds Forum
FG Community Teamspeak Server: ts.fg-con.com
Interested in Custom Character Portraits and Tokens? Contact me.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks