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

Solved Some Error and other!

Tickit

Member
Joined
Feb 20, 2009
Messages
364
Reaction score
5
Location
Somewhere in the jungle of Sweden
Hello OTLanders =)

I could need some help with some errors etc, this is the first one:

Code:
[10/05/2013 13:40:56] [Error - GlobalEvent Interface] 
[10/05/2013 13:40:56] data/globalevents/scripts/record.lua:onRecord
[10/05/2013 13:40:56] Description: 
[10/05/2013 13:40:56] data/globalevents/scripts/record.lua:2: attempt to call field 'executeQuery' (a nil value)
[10/05/2013 13:40:56] stack traceback:
[10/05/2013 13:40:56] 	data/globalevents/scripts/record.lua:2: in function <data/globalevents/scripts/record.lua:1>

The record globalevent is bugging though I dont know why? I also has this one:

Code:
[10/05/2013 13:16:17] [Warning] NpcSystem:
[10/05/2013 13:16:17] Parameter 'keyword_reply3' missing. Skipping...
[10/05/2013 13:16:17] [Warning] NpcSystem:
[10/05/2013 13:16:17] Parameter 'keyword_reply4' missing. Skipping...

Something with the 'keyword_reply'..
 
Please post your record.lua script for the first error.

On the second one you have to search in your otfiles which npc xml is wrong.

This system works like this:

You add for example a tag

PHP:
<parameter key="keywords" value="key1;key2;key3;key4;" />

in your npc xml, as we have 4 keywords in this tag, we must add four keywords replies as well:

PHP:
<parameter key="keyword_reply1" value="test1" />
<parameter key="keyword_reply2" value="test2" />
<parameter key="keyword_reply3" value="test3" />
<parameter key="keyword_reply4" value="test4" />

So one of your npcs added more keywords than keyword replies tags.
 
Please post your record.lua script for the first error.

On the second one you have to search in your otfiles which npc xml is wrong.

This system works like this:

You add for example a tag

PHP:
<parameter key="keywords" value="key1;key2;key3;key4;" />

in your npc xml, as we have 4 keywords in this tag, we must add four keywords replies as well:

PHP:
<parameter key="keyword_reply1" value="test1" />
<parameter key="keyword_reply2" value="test2" />
<parameter key="keyword_reply3" value="test3" />
<parameter key="keyword_reply4" value="test4" />

So one of your npcs added more keywords than keyword replies tags.

Thanks alot! Here's my record.lua

Code:
function onRecord(current, old, cid)
	db.executeQuery("INSERT INTO `server_record` (`record`, `world_id`, `timestamp`) VALUES (" .. current .. ", " .. getConfigValue('worldId') .. ", " .. os.time() .. ");")
	addEvent(doBroadcastMessage, 150, "New record: " .. current .. " players are logged in.", MESSAGE_STATUS_DEFAULT)
end
 
Please check three things:

- Do you have data/lib/004-database.lua file?
- Do you have worldId field in your config.lua and it´s set correct?
- Do you have server_record table created in your database?
 
Try db.query, if that still doesn't work, go to your lib/100-compat.lua and look for the line with something like db.executeQuery = db.query, replace them with eachother or delete the line.
 
Back
Top