• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

npc Script problem

zerghel

Tsuni
Joined
Jul 1, 2008
Messages
299
Reaction score
9
i wonder how can this be solved
Code:
[27/03/2011 13:46:35] Lua Script Error: [Npc interface] 
[27/03/2011 13:46:35] data/npc/scripts/default.lua:onThink
[27/03/2011 13:46:35] attempt to call a nil value
[27/03/2011 13:46:35] stack traceback:
[27/03/2011 13:46:35] 	[C]: ?

[27/03/2011 13:46:35] Lua Script Error: [Npc interface] 
[27/03/2011 13:46:35] data/npc/scripts/default.lua:onThink
[27/03/2011 13:46:35] Stack size changed!
the thing is that i think this script is causing crashes on my server
this error only appears when reloading NPC's via GUI(and somethimes crashes)
please help i've been trhu this since Mystic Spirit 0.2.8
please help:(
 
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

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

npcHandler:addModule(FocusModule:new())
This is the script (sorry for the double post)
 
Back
Top