lokiare
September 15th, 2014, 21:12
On the rule set I'm developing I'm having an odd error happen. When a player that is connected rolls an attack while targeting an creature or dropping a roll on a token on the map or a creature on the combat tracker, it throws the following error:
Script Error: [string "scripts/manager_action_attack.lua"]:428: setValue: Unable to create node
The lines in question are:
-- Get the node and type for the target
local sTargetType, nodeTarget = ActorManager.getTypeAndNode(rTarget);
local sSourceType, nodeSource = ActorManager.getTypeAndNode(rSource);
local sourceName = DB.getValue(nodeSource, "name", "no name");
DB.setValue(nodeTarget, sourceName .. "resistChance", "number", rAction.nFirstDie);
rAction.nFirstDie is the result of a die roll.
I have no clue why this happens because if I connect locally on the same computer with a different instance of fantasy grounds it works without a problem.
I've used the debug console to get some of the values of the variables and here is the result:
Runtime Notice: s'Manager_action_attack->onAttack(): sourceName: Moe; rAction.nFirstDie: 13; sTargetType: ct; nodeTarget: not nil'
My only thoughts is that the client is trying to save the value to the database and it doesn't have access to it. If that is so, how would I get around that limitation to temporarily save the value so that the damage roll can access it?
The manager_action_attack is almost identical to the 4E one for reference. Thanks for your assistance.
Script Error: [string "scripts/manager_action_attack.lua"]:428: setValue: Unable to create node
The lines in question are:
-- Get the node and type for the target
local sTargetType, nodeTarget = ActorManager.getTypeAndNode(rTarget);
local sSourceType, nodeSource = ActorManager.getTypeAndNode(rSource);
local sourceName = DB.getValue(nodeSource, "name", "no name");
DB.setValue(nodeTarget, sourceName .. "resistChance", "number", rAction.nFirstDie);
rAction.nFirstDie is the result of a die roll.
I have no clue why this happens because if I connect locally on the same computer with a different instance of fantasy grounds it works without a problem.
I've used the debug console to get some of the values of the variables and here is the result:
Runtime Notice: s'Manager_action_attack->onAttack(): sourceName: Moe; rAction.nFirstDie: 13; sTargetType: ct; nodeTarget: not nil'
My only thoughts is that the client is trying to save the value to the database and it doesn't have access to it. If that is so, how would I get around that limitation to temporarily save the value so that the damage roll can access it?
The manager_action_attack is almost identical to the 4E one for reference. Thanks for your assistance.