Am really struggling very much in deleting an item from table, am creating the table as dynamically,and inserting values in table working really great, but removing values from table making me really trouble. here is my script :
local key = isValueExists ( blowUpArray, spriteNo )
if key ~= nil then
table.remove ( blowUpArray, key )
end
function isValueExists(tbl, item)
for key, value in pairs(tbl) do
if value == item then
return key
end
end
return nil
end
what am doing wrong here ?