• 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!

Problem with npc, please help ;<

shor

New Member
Joined
Jan 2, 2011
Messages
137
Reaction score
0
Location
Poland
My ots is online for 4h, then I have big problem, in my console appear bug and spamm all the time, it makes lags

Code:
[03/01/2011 19:33:20] Lua Script Error: [Npc interface] 
[03/01/2011 19:33:20] data/npc/scripts/default.lua:onThink
[03/01/2011 19:33:20] data/npc/lib/npcsystem/npchandler.lua:293: bad argument #3 to 'gsub' (string/function/table expected)
[03/01/2011 19:33:20] stack traceback:
[03/01/2011 19:33:20] 	[C]: ?
[03/01/2011 19:33:20] 	[C]: in function 'gsub'
[03/01/2011 19:33:20] 	data/npc/lib/npcsystem/npchandler.lua:293: in function 'parseMessage'
[03/01/2011 19:33:20] 	data/npc/lib/npcsystem/npchandler.lua:529: in function 'onWalkAway'
[03/01/2011 19:33:20] 	data/npc/lib/npcsystem/npchandler.lua:465: in function 'onThink'
[03/01/2011 19:33:20] 	data/npc/scripts/default.lua:8: in function <data/npc/scripts/default.lua:8>

my default.lua

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())

Mistic Spirit 0.2.9
 
Back
Top