terrell
August 19th, 2010, 14:21
After loading the 2.7 update, I am getting a script error in the Warhammer Ruleset.
Script Error [String "scripts/combattracker_targeting.lua"]:26: attempt to index local 'V'[a userdata value]
This happens after a token on the map has been targeted and untargeted. The next time the token is targeted the script error occurs. Also, the token will no longer show being targeted on the combat tracker. It still shows it is being targeted on the map. Everything seems to work correctly the first time only.
Any suggestions?
I have to assume this is happening in this function:
function update(token)
for k, v in ipairs(widgets) do
v.destroy();
end
empty = true;
local ids = token.getTargetingIdentities();
local w, h = getSize();
local spacing = w / #ids;
if spacing > tonumber(iconspacing[1]) then
spacing = iconspacing[1];
end
for i = #ids, 1, -1 do
widgets[i] = addBitmapWidget("portrait_" .. ids[i] .. "_miniportrait");
widgets[i].setPosition("right", -(iconspacing[1]/2 + (i-1)*spacing), 0);
empty = false;
end
window.setDefensiveVisible(not isEmpty());
end
Script Error [String "scripts/combattracker_targeting.lua"]:26: attempt to index local 'V'[a userdata value]
This happens after a token on the map has been targeted and untargeted. The next time the token is targeted the script error occurs. Also, the token will no longer show being targeted on the combat tracker. It still shows it is being targeted on the map. Everything seems to work correctly the first time only.
Any suggestions?
I have to assume this is happening in this function:
function update(token)
for k, v in ipairs(widgets) do
v.destroy();
end
empty = true;
local ids = token.getTargetingIdentities();
local w, h = getSize();
local spacing = w / #ids;
if spacing > tonumber(iconspacing[1]) then
spacing = iconspacing[1];
end
for i = #ids, 1, -1 do
widgets[i] = addBitmapWidget("portrait_" .. ids[i] .. "_miniportrait");
widgets[i].setPosition("right", -(iconspacing[1]/2 + (i-1)*spacing), 0);
empty = false;
end
window.setDefensiveVisible(not isEmpty());
end