This is a small section of a script I am attempting that searches the contents of 4 alcoves for various things. I'm trying to pass values between functions (for the first time) so I have more than one function on the script.
Code: Select all
function qtyCheck(punished)
local punished
local test = false -- false means test failed
for n = 1,4 do
if ScaleAlcove[n]:getItemCount() ~= 3 then
judgement(test) -- send false to judgement function indicate fail
return punished -- should return true allThiingsEqual function
end -- and stop qtyCheck function
test = true -- indicate test passed
judgement(test)
return punished
end
endHow do I make it recognize it as an entity id and not a variable?
Many thanks in advance.
edit: actual verbage attempt to index global 'ScaleAlcove' (a nil value)
