-
February 23rd, 2015, 23:10 #1
Issue with the Control Key, Targeting and the Modifier Stack...
I'm not sure where or when this problem began... I've not worked on my ruleset in a few months... but now whenever I try and make a roll it gives me this error:
Code:Script Error: [string "desktop/scripts/modifierstack.lua"]:241: attempt to index global 'control' (a nil value)
Anyone have any ideas as to what might be going on there... where I might look to fix it?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.
-
February 23rd, 2015, 23:44 #2
Hrm. I wonder if this has something to do with that 'targeting toggle' thing. Since I removed the modifier box.. that obviously does not exist either.
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.
-
February 23rd, 2015, 23:53 #3
I'm assuming your ruleset is layered on top of CoreRPG?
If so, you need to override the ModifierStack.getTargeting() function.
If you don't have modifierstack.lua in your ruleset, have some code in your ruleset that makes this function do nothing. Such as:
Code:ModifierStack.getTargeting = myOverride; function myOverride() return true; end
Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
February 23rd, 2015, 23:59 #4
This is attached to a new CoreRPG feature? I don't see the reference in the update notes... unless it's :
[CoreRPG+] Added targeting toggle to desktop for all rolls.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.
-
February 24th, 2015, 00:18 #5
Yep, that's what it is.
Yep, but it's better in a .lua file, in case you get errors around it, as it will tell you the LUA file and the line number.
Also, if you don't want rolls dropped into the chat window to use targeting as default then change the return true; in the myOverride function to return false; Essentially this function is emulating what state the new toggle is in.Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
February 24th, 2015, 05:53 #6
Hmm.. tried putting it into data_common.lua ... that didn't fly... Hrm.
Code:Script Error: [string "scripts/data_common.lua"]:810: attempt to index global 'ModifierStack' (a nil value) Script Error: [string "desktop/scripts/modifierstack.lua"]:241: attempt to index global 'control' (a nil value)
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.
-
February 24th, 2015, 06:16 #7
Which data_common.lua file? The one in your ruleset or Core RPG?
Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
February 24th, 2015, 06:18 #8
The one for the ruleset... obviously I can't mess with the CoreRPG one since I can only modify my ruleset. Is there a better place to put it? I get the impression that data_common.lua is getting loaded too soon for it to work properly.
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.
-
February 24th, 2015, 06:25 #9
Put it in it's own LUA file - so you know where your override functions are. Or call it modifierstack_override.lua so you know what it's actually doing. Put the ModifierStack.getTargeting = myOverride; code in an onInit() function so that it is called when the LUA file is loaded.
Code:function onInit() ModifierStack.getTargeting = myOverride; end function myOverride() return true; end
Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
February 24th, 2015, 08:18 #10
Cool. Putting the first line into the onInit() kicked the problem. Thanks Trenloe.
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