Acho que isso é moleza pra quem sabe. Alguém aí pode me dizer como consertar esse erro do script? Rep +
[30/01/2012 08:40:32] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Nome.lua
[30/01/2012 08:40:32] data/npc/scripts/Nome.lua:62: 'end' expected (to close 'function' at line 11) near '<eof>
Vo colocar a parte onde o erro aparece e a parte final do script. Segue o script:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
-- OTServ event handling functions start
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
-- OTServ event handling functions end
function creatureSayCallback(cid, type, msg)
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
if(not npcHandler:isFocused(cid)) then
return false
end
.
.
.
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())