• 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 Error - Npc interface

dominique120

Science & Reason
Senator
Premium User
Joined
Jun 16, 2013
Messages
3,881
Solutions
3
Reaction score
1,043
Location
Númenor
Hi guys:

When I start up TFS I get like 100 of these messages.

[15/09/2013 20:09:01] [Error - Npc interface]
[15/09/2013 20:09:01] data/npc/scripts/runes.lua
[15/09/2013 20:09:01] Description:
[15/09/2013 20:09:01] data/npc/scripts/runes.lua:1: attempt to index global 'KeywordHandler' (a nil value)
[15/09/2013 20:09:01] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/runes.lua


I honstly have no clue as to what causes this. please help me with this.

I am running MoonOTS v3 datapack with the crying damson (0.3.6 v8.2 for client 8.60) release.

Thanks!


Edit: People can still connect normally and do whatever they want but I cant see any npcs.
 
Last edited:
This means the directory in the npc.lua (maybe also in the npcsystem.lua) isn't correct for your server, so it can't find the npcsystem files.
What you can do is change the directory or replace the lib folder in data/npc with the original one from your server.

Btw, do you mean 0.3.6 instead of 0.3.8?
Then in the npc.lua the directory at the top should look like this (if there is nothing there just add it).
Code:
dofile(getDataDir() .. 'npc/lib/npcsystem/npcsystem.lua')

And in the npcsystem.lua (this is correct most of the time, but you can check just to be sure).
Code:
  dofile(getDataDir() .. 'npc/lib/npcsystem/keywordhandler.lua')
   dofile(getDataDir() .. 'npc/lib/npcsystem/queue.lua')
   dofile(getDataDir() .. 'npc/lib/npcsystem/npchandler.lua')
   dofile(getDataDir() .. 'npc/lib/npcsystem/modules.lua')
 
Woops, yes I meant 0.3.6.

This worked perfectly, thank you!

I have a few other warnings and errors, the appear similar in nature. Should I create a new topic for them or could you help me here?
 
I get these ones when I start the server

Code:
Loading items
[16/09/2013 11:21:35] [Warning - Items::loadFromXml] Unknown key value walkStack
[16/09/2013 11:21:35] [Warning - Items::loadFromXml] Unknown key value walkStack

Code:
 Loading script systems
[16/09/2013 11:21:36] [Error - GlobalEvent::configureEvent] No valid type "globalsave" for globalevent with name globalsave
[16/09/2013 11:21:36] [Warning - BaseEvents::loadFromXml] Cannot configure an event
[16/09/2013 11:21:36] [Warning - Event::loadScript] Event onTimer not found (data/globalevents/scripts/temple.lua)
[16/09/2013 11:21:36] [Warning - Event::loadScript] Event onTimer not found (data/globalevents/scripts/temple.lua)
[16/09/2013 11:21:36] [Warning - Event::loadScript] Event onTimer not found (data/globalevents/scripts/temple.lua)
[16/09/2013 11:21:36] [Warning - Event::loadScript] Event onTimer not found (data/globalevents/scripts/templeoff.lua)

Code:
 Initializing game state modules and registering services...

[16/09/2013 11:21:55] [Error - GlobalEvent Interface]
[16/09/2013 11:21:55] data/globalevents/scripts/init.lua:onStartup
[16/09/2013 11:21:55] Description:
[16/09/2013 11:21:55] data/globalevents/scripts/init.lua:9: attempt to call field 'executeQuery' (a nil value)
[16/09/2013 11:21:55] stack traceback:
[16/09/2013 11:21:55]    data/globalevents/scripts/init.lua:9: in function <data/globalevents/scripts/init.lua:8>

I got this one but I dont know what triggered it.

Code:
[Error - GlobalEvent Interface]
[16/09/2013 11:24:37] data/globalevents/scripts/record.lua:onRecord
[16/09/2013 11:24:37] Description:
[16/09/2013 11:24:37] data/globalevents/scripts/record.lua:2: attempt to call field 'executeQuery' (a nil value)
[16/09/2013 11:24:37] stack traceback:
[16/09/2013 11:24:37]    data/globalevents/scripts/record.lua:2: in function <data/globalevents/scripts/record.lua:1>

And a quick question, is there a way to look at the text of all the signs and blackboards in the map instead of looking for all the signs myself in the map editor?

Thanks again for all the help.
 
1. Go to items.xml and delete the attribute lines with walkStack
2. Go to globalevents.xml, remove the line with type globalsave and in globalevents/scripts in the files temple.lua and templeoff.lua change function onTime to function onTimer.
3. Go to data/lib/100-compat.lua and look for this line.
Code:
db.executeQuery = db.query
Remove it or replace them with eachother.
 
Everything appears to boot normally now bit I'm still getting this:

Code:
[16/09/2013 12:26:59] [Error - GlobalEvent::configureEvent] No valid type "globalsave" for globalevent with name globalsave
[16/09/2013 12:26:59] [Warning - BaseEvents::loadFromXml] Cannot configure an event

And now I get this, I dont know why.

Code:
[16/09/2013 12:27:15] >> Initializing game state modules and registering services...
[16/09/2013 12:27:15] mysql_real_query(): DELETE FROM `guild_wars` WHERE `status` = 0 AND `begin` < 1379176035; - MYSQL ERROR: Table 'otserv.guild_wars' doesn't exist (1146)
[16/09/2013 12:27:15] mysql_real_query(): UPDATE `guild_wars` SET `status` = 5, `end` = 1379348835 WHERE `status` = 1 AND `end` > 0 AND `end` < 1379348835; - MYSQL ERROR: Table 'otserv.guild_wars' doesn't exist (1146)
[16/09/2013 12:27:15] mysql_real_query(): SELECT `id`, `ownerid`, `creationdata`, `checkdata` FROM `guilds` WHERE `world_id` = 0; - MYSQL ERROR: Unknown column 'checkdata' in 'field list' (1054)
 
Look for something like type="globalsave" in your globalevents.xml and delete that line, or if it still isn't solved, post your globalevents.xml.
The second error is probable from init.lua, you can check to be sure, but you can just delete the line in globalevents.xml since the guildwars system isn't for 0.3.6.
 
I deleted that line. I get no errors or warnings now. Thank you.

And a quick question, is there a way to look at the text of all the signs and blackboards in the map instead of looking for all the signs myself in the map editor?
 
Back
Top