function onThink(cid)
local summons = getCreatureSummons(cid)
if getPlayerStorageValue(cid, ZEA_JOIN) == 1 then -- add this line :)
if #summons >= 1 then
if isCreature(summons[1]) then
doRemoveCreature(summons[1])
end
end
end
return true
end
function onThink(cid)
local summons = getCreatureSummons(cid)
if #summons > 0 and getPlayerStorageValue(cid, ZEA_JOIN) == 1 then
for i = 1, #summons do
doRemoveCreature(summons[i])
end
end
return true
end
[Error - CreatureScript Interface]
[08/04/2014 16:44:15] data/creaturescripts/scripts/lms/lms.lua: OnThink
[08/04/2014 16:44:15] Description:
[08/04/2014 16:44:16] data/creaturescripts/scripts/lms/lms.lua:64: attempt to compare number with boolean
[08/04/2014 16:44:16] stack traceback:
[08/04/2014 16:44:16] data/creaturescripts/scripts/lms/lms.lua:64: in function <data/creaturescripts/scripts/lms/lms.lua:62>
function onThink(cid)
local summons = getCreatureSummons(cid)
if #summons > 0 and getPlayerStorageValue(cid, ZEA_JOIN) == 1 then
for i = 1, #summons do
doRemoveCreature(summons[i])
end
end
return true
end