function onSay(cid, words, param, channel)
local summons,str = getCreatureSummons(cid), "Your summons are: "
for i = 1,#summons do
str = str .. getCreatureName(summons[i]) .. (i == #summons and "" or ", ")
end
if #summons == 0 then
str = "You dont have any summons."
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)
return true
end
[03/08/2010 15:02:21] [Error - Action Interface]
[03/08/2010 15:02:21] data/actions/scripts/testear.lua:onUse
[03/08/2010 15:02:21] Description:
[03/08/2010 15:02:21] data/actions/scripts/testear.lua:5: attempt to index global 'summon' (a nil value)
[03/08/2010 15:02:21] stack traceback:
[03/08/2010 15:02:21] data/actions/scripts/testear.lua:5: in function <data/actions/scripts/testear.lua:1>