Dragon_of_old
April 23rd, 2025, 02:22
Hello everyone,
I'm working on creating a rule set using the Ruleset wizard for the XML part, but I'm having an issue with my LUA script. So I have a window where my players will be able to create custom spells for my game system, and this window facilitates that part.
So I'm trying to do it mechanically, when the player clicks a checkbox for the "random turns" line of the window, the Lua script takes the value of -8 from one number field and places it in the total number field. But I keep getting this error.
64130
I am still very unfamiliar with Lua, so I may be missing an elementary step in making this script work.
64131
Here is my current script.
function onValueChanged()
local infoGet = window.getDatabaseNode();
local RTcheck = infoGet.getChild("r_t_check").getValue();
local ptsDef= infoGet.getChild("defaul_score").getValue();
local ptsVal = infoGet.getChild("2_base_pts_num_fie").getValue();
local putPTS = infoGet.getChild("2_tol").setValue(ptsVal);
if RTcheck == 0 then
RTcheck = ptsDef
elseif RTcheck == 1 then
RTcheck = ptsVal
end
end
Any insight is welcomed, thank you for your time
I'm working on creating a rule set using the Ruleset wizard for the XML part, but I'm having an issue with my LUA script. So I have a window where my players will be able to create custom spells for my game system, and this window facilitates that part.
So I'm trying to do it mechanically, when the player clicks a checkbox for the "random turns" line of the window, the Lua script takes the value of -8 from one number field and places it in the total number field. But I keep getting this error.
64130
I am still very unfamiliar with Lua, so I may be missing an elementary step in making this script work.
64131
Here is my current script.
function onValueChanged()
local infoGet = window.getDatabaseNode();
local RTcheck = infoGet.getChild("r_t_check").getValue();
local ptsDef= infoGet.getChild("defaul_score").getValue();
local ptsVal = infoGet.getChild("2_base_pts_num_fie").getValue();
local putPTS = infoGet.getChild("2_tol").setValue(ptsVal);
if RTcheck == 0 then
RTcheck = ptsDef
elseif RTcheck == 1 then
RTcheck = ptsVal
end
end
Any insight is welcomed, thank you for your time