Hello!
I got some problems with my npc's and can't get them to work properly. The main one is causing a lot of npc to not spawn att all and the error given in the console is the following:
I've made sure that I have the addAliasKeyword in my npc scripts and it looks like this:
The other problem happens when I try to ask for tasks. The console gives the following error:
I'm using TFS 1.3 cloned and compiled two days ago.
I got some problems with my npc's and can't get them to work properly. The main one is causing a lot of npc to not spawn att all and the error given in the console is the following:
data/npc/scripts/Zerbrus.lua:29: attempt to call method 'addAliasKeyword'
stack traceback:
[C]: in function 'addAliasKeyword'
I've made sure that I have the addAliasKeyword in my npc scripts and it looks like this:
Lua:
function KeywordNode:addAliasKeyword(keywords)
if #self.children == 0 then
print('KeywordNode:addAliasKeyword no previous node found')
return false
end
local prevNode = self.children[#self.children]
local new = KeywordNode:new(keywords, prevNode.callback, prevNode.parameters, prevNode.condition, prevNode.action)
for i = 1, #prevNode.children do
new:addChildKeywordNode(prevNode.children[i])
end
return self:addChildKeywordNode(new)
end
The other problem happens when I try to ask for tasks. The console gives the following error:
data/npc/scripts/Grizzly Adams.lua:onCreatureSay
data/npc/scripts/Grizzly Adams.lua:120: attempt to call method 'getTasks' (a nil value)
stack traceback:
data/npc/scripts/Grizzly Adams.lua:120: in function 'callback'
data/npc/lib/npcsystem/npchandler.lua:412: in function 'onCreatureSay'
data/npc/scripts/Grizzly Adams.lua:7: in function <data/npc/scripts/Grizzly Adams.lua:7>
I'm using TFS 1.3 cloned and compiled two days ago.