Thread: Buttons no longer working...
-
October 8th, 2023, 05:22 #1
Buttons no longer working...
I had set up buttons for various equipment types.. armor.. weapons.. mirroring the 3.5 setup for my HERO System ruleset.. and they were working just fine.. now they give the following error..
[ERROR] Script execution error: [string "C:masterindex_buttons:button_custom3"]:8: attempt to call field 'init' (a nil value)
I'm not sure what I need to change to get this working again.
I get this same error with my NPC buttons as well.Last edited by Blackfoot; October 8th, 2023 at 05:56.
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.
-
October 8th, 2023, 06:07 #2
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,613
I'm not sure what "button_custom3" is, since it looks like your own template. You'll have to see what it is inheriting from.
In the 3.5E ruleset, those templates look like this:
Code:<template name="button_npc_byletter"> <button_masterindex_option_view> <recordtype>npc</recordtype> <recordview>byletter</recordview> <recordpath>reference.npcdatabyletter</recordpath> </button_masterindex_option_view> </template>
JPG
-
October 8th, 2023, 06:41 #3
button_custom <number>
is created by your code.. in masterindex_window.lua
Code:function setupButtons() local aIndexButtons = LibraryData.getIndexButtons(self.getRecordType()); if #aIndexButtons > 0 then sub_buttons.setValue("masterindex_buttons", ""); for k,v in ipairs(aIndexButtons) do sub_buttons.subwindow.createControl(v, "button_custom" .. k); end end local aEditButtons = LibraryData.getEditButtons(self.getRecordType()); if #aEditButtons > 0 then for k,v in ipairs(aEditButtons) do local c = createControl(v, "button_edit" .. k); if c then c.setVisible(true); table.insert(_tEditControls, c); end end end end
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.
-
October 8th, 2023, 18:02 #4
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,613
True, thanks for seeing that.
However, none of the button templates in the CoreRPG ruleset have an "init" function, including the default template for those buttons. So, you must be passing a named template via aGMListButtons in the data library script for your ruleset that is defining scripts which are making an "init" function call.
Here are the default templates for master index buttons from CoreRPG currently
Code:<template name="button_masterindex_option"> <button_text_sm> <anchored to="buttonanchor" width="80"> <top /> <left anchor="right" relation="relative" offset="5" /> </anchored> </button_text_sm> </template> <template name="button_masterindex_option_view"> <button_masterindex_option> <script> .... </script> </button_masterindex_option> </template>
Regards,
JPG
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks