Galera eu fis o comando sertinho mas ele ta dando um erro na Linha 15 Não sei por que
Script V
local MonsterName = "horse" local MaximoSummon = 1 function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end if param == "on" then local summons = getCreatureSummons(cid) if(table.maxn(summons) < MaximoSummon) then doConvinceCreature(cid, doCreateMonster(MonsterName, getCreaturePosition(cid))) end elseif param == "bye" then for _, pid in ipairs(summons) do doRemoveCreature(pid) end end return FALSE end
To con duvida oque eu posso colocar colocar
erro
[19/06/2010 12:48:30] Lua Script Error: [TalkAction Interface] [19/06/2010 12:48:30] data/talkactions/scripts/animal.lua:onSay [19/06/2010 12:48:30] data/talkactions/scripts/animal.lua:15: bad argument #1 to 'ipairs' (table expected, got nil) [19/06/2010 12:48:30] stack traceback: [19/06/2010 12:48:30] [C]: in function 'ipairs' [19/06/2010 12:48:30] data/talkactions/scripts/animal.lua:15: in function <data/talkactions/scripts/animal.lua:4>