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

Windows NPC Errors

Jfrye

Mapper, trying to learn scripting
Joined
Jan 8, 2009
Messages
366
Solutions
5
Reaction score
86
Location
Mexico Missouri
Im having issues loading NPCS into the 10.77 client.


I keep getting this

Lua Script Error: [Npc interface]
data/npc/lib/npc.lua
data/npc/lib/npcsystem/customModules.lua:3: attempt to index global 'Storage' (a nil value)
stack traceback:
[C]: in function '_index'
data/npc/lib/npcsystem/customModules.lua:3: in main chunk
[C]: in funtion 'dofile'
data/npc/lib/npc.lua:3: in main chunk
[Warning - NpcScriptInterface::loadNpcLib] Can not load data/npc/lib/npc.lua


Then it goes on to list a few different NPCS that have issues, such as addGreetKeyword (a nil value)

or

attempt to index global 'VoiceModule' (a nil value)



What am I missing here? I have looked through the script, but I honestly dont see what is wrong.

Any help is greatly appreciated, as I can not load any NPCs into the game.
 
data/npc/lib/npcsystem/customModules.lua:3: attempt to index global 'Storage' (a nil value)
Inside customModules.lua your script is trying to call Storage which is used in ORTS project as a lib for storages.
If you don't use ORTS remove or replace that line with a storageID.

attempt to index global 'VoiceModule' (a nil value)
The NPCs is trying to use a function called VoiceModule, seems like you don't have that either.
You can find the code for VoiceModule here:
https://github.com/orts/server/blob/master/data/npc/lib/npcsystem/customModules.lua#L167

Then it goes on to list a few different NPCS that have issues, such as addGreetKeyword (a nil value)
Same with this, you can find the GreetKeyword function here:
https://github.com/orts/server/blob/master/data/npc/lib/npcsystem/customModules.lua#L79
 
I have all of that stuff. Its word for word in the script.

And as far as removing or replacings that line with a storageID, what exactly are you talking about?
 
It seems to be an issue with my VoiceModules....If I remove this line npcHandler:addModule(VoiceModule:new(voices)) from the npc script, then the npcs will spawn in the map like they should, but then they wont talk. Does anyone have any ideas?
 
I have tried changing many sources. Now it gives me an issue with npchandler.lua, and says getTibianTime a nil value.

It's tfs 1.1 and 10.77 client version.
 
Back
Top