Thaian Citizen
Hexenjäger
Hello everyone, when I go to any npc and type something my server prints this error:
(further down you see the part of npcsystem/modules.lua that is refered to)
Here the modules.lua
othire distro / edited / npc's yet untouched - only added advanced jiddo npc system (module)
(needed the advanced because regular othire was missing sellspell stuff for example)
I tried a few things but I can't really understand the misstake or I simply don't see it so I am kinda helpless when it comes to making up possible solutions
(further down you see the part of npcsystem/modules.lua that is refered to)
Code:
attempt to index a function value
stack traceback:
[C]: in function 'getSpectators'
data/npc/scripts/lib/npcsystem/modules.lua:275: in function <data/npc/scripts/lib/npcsystem/modules.lua:272>
(tail call): ?
data/npc/scripts/lib/npcsystem/keywordhandler.lua:176: in function 'processNodeMessage'
data/npc/scripts/lib/npcsystem/keywordhandler.lua:133: in function 'processMessage'
data/npc/scripts/lib/npcsystem/npchandler.lua:296: in function 'onCreatureSay'
data/npc/scripts/spellsfree.lua:8: in function <data/npc/scripts/spellsfree.lua:8>
Here the modules.lua
Code:
-- Custom message matching callback function for greeting messages.
function FocusModule.messageMatcher(keywords, message)
local spectators = Game.getSpectators(getCreaturePosition(getNpcId()), false, false, 0, 7, 0, 7)
for i, word in pairs(keywords) do
if(type(word) == 'string') then
if(string.find(message, word) and not string.find(message, '[%w+]' .. word) and not string.find(message, word .. '[%w+]')) then
if(string.find(message, getCreatureName(getNpcId()))) then
return true
end
for i, uid in ipairs(spectators) do
if(string.find(message, getCreatureName(uid))) then
return false
end
end
return true
end
end
end
return false
end
othire distro / edited / npc's yet untouched - only added advanced jiddo npc system (module)
(needed the advanced because regular othire was missing sellspell stuff for example)
I tried a few things but I can't really understand the misstake or I simply don't see it so I am kinda helpless when it comes to making up possible solutions