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

Lua NPC Addon Error

nefinoo

Carnage.flv
Joined
Sep 11, 2010
Messages
428
Solutions
1
Reaction score
35
Location
Lo Mochis, Sinaloa
After 'second demon outfit addon' the console show me this error

Code:
Lua Script Error: [Npc interface]
data/npc/scripts/addons.lua:onCreatureSay
data/npc/scripts/addons.lua:264: attempt to compare number with nil
stack traceback:
        [C]: in function '__lt'
        data/npc/scripts/addons.lua:264: in function 'callback'
        data/npc/lib/npcsystem/npchandler.lua:411: in function 'onCreatureSay'
        data/npc/scripts/addons.lua:7: in function <data/npc/scripts/addons.lua:7>

I am printing print(talkState[talkUser]) and show me nill into console

nil
10078
10080
10082
nil
10083

I attach the document of my npc, since I can not put it complete here.
 

Attachments

Solution
After 'second demon outfit addon' the console show me this error

Code:
Lua Script Error: [Npc interface]
data/npc/scripts/addons.lua:onCreatureSay
data/npc/scripts/addons.lua:264: attempt to compare number with nil
stack traceback:
        [C]: in function '__lt'
        data/npc/scripts/addons.lua:264: in function 'callback'
        data/npc/lib/npcsystem/npchandler.lua:411: in function 'onCreatureSay'
        data/npc/scripts/addons.lua:7: in function <data/npc/scripts/addons.lua:7>

I am printing print(talkState[talkUser]) and show me nill into console

nil
10078
10080
10082
nil
10083

I attach the document of my npc, since I can not put it complete here.
change
Lua:
elseif msgcontains(msg, "yes") then
to
Lua:
elseif...

Xikini

I whore myself out for likes
Support Team
Joined
Nov 17, 2010
Messages
5,612
Solutions
395
Reaction score
3,731
After 'second demon outfit addon' the console show me this error

Code:
Lua Script Error: [Npc interface]
data/npc/scripts/addons.lua:onCreatureSay
data/npc/scripts/addons.lua:264: attempt to compare number with nil
stack traceback:
        [C]: in function '__lt'
        data/npc/scripts/addons.lua:264: in function 'callback'
        data/npc/lib/npcsystem/npchandler.lua:411: in function 'onCreatureSay'
        data/npc/scripts/addons.lua:7: in function <data/npc/scripts/addons.lua:7>

I am printing print(talkState[talkUser]) and show me nill into console

nil
10078
10080
10082
nil
10083

I attach the document of my npc, since I can not put it complete here.
change
Lua:
elseif msgcontains(msg, "yes") then
to
Lua:
elseif msgcontains(msg, "yes") and talkState[talkUser] then
 
Solution
OP
OP
nefinoo

nefinoo

Carnage.flv
Joined
Sep 11, 2010
Messages
428
Solutions
1
Reaction score
35
Location
Lo Mochis, Sinaloa
change
Lua:
elseif msgcontains(msg, "yes") then
to
Lua:
elseif msgcontains(msg, "yes") and talkState[talkUser] then
Now it does not give me an error in the console, and when I ask for the addon it does not tell me that I do not have the necessary items, it just does not tell me anything and there is no error in the console
 
Top