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

Globalevents error

nickpoo2

New Member
Joined
Jan 19, 2009
Messages
92
Reaction score
0
when i get to the part when it says
Code:
Initializing game state modules and registering services...

the next line looks like this
Code:
[Error - GlobalEvent Interface] 
[10/08/2010 13:46:32] data/globalevents/scripts/start.lua:onStartup
[10/08/2010 13:46:32] Description: 
[10/08/2010 13:46:32] data/globalevents/scripts/start.lua:2: attempt to concatenate a nil value
[10/08/2010 13:46:32] stack traceback:
[10/08/2010 13:46:32] 	data/globalevents/scripts/start.lua:2: in function <data/globalevents/scripts/start.lua:1>

i dont no how to fix it so heres the script:
Code:
function onStartup()
	db.executeQuery("UPDATE `players` SET `online` = 0 WHERE `world_id` = " .. getConfigValue('worldId') .. ";")
	return true
end
 
Try
Lua:
function onStartup()
	db.Query("UPDATE `players` SET `online` = 0 WHERE `world_id` = " .. getConfigValue('worldId') .. ";")
	return true
end
 
Lua:
function onStartup()
	db.executeQuery("UPDATE `players` set `online` = '0' WHERE `world_id` = " .. getConfigValue('worldId') .. ";")
	return true
end
 
Lua:
function onStartup()
	db.executeQuery("UPDATE `players` SET `online` = 0 WHERE `world_id` = " .. getConfigInfo('worldId') .. ";")
	return true
end
or
Lua:
function onStartup()
	db.Query("UPDATE `players` SET `online` = 0 WHERE `world_id` = " .. getConfigInfo('worldId') .. ";")
	return true
end
Changed value to info as like Fallen said
 
well i added both of those things and i still get the same error

Code:
[Error - GlobalEvent Interface] 
[10/08/2010 14:26:47] data/globalevents/scripts/start.lua:onStartup
[10/08/2010 14:26:47] Description: 
[10/08/2010 14:26:47] data/globalevents/scripts/start.lua:2: attempt to concatenate a nil value
[10/08/2010 14:26:47] stack traceback:
[10/08/2010 14:26:47] 	data/globalevents/scripts/start.lua:2: in function <data/globalevents/scripts/start.lua:1>
 
Lua:
local worldi = getConfigValue('worldId')
function onStartup()
if worldi == 0 then
	db.executeQuery("UPDATE `players` SET `online` = 0 WHERE `world_id` = 0;")
elseif worldi == 1 then
	db.executeQuery("UPDATE `players` SET `online` = 0 WHERE `world_id` = 1;")
	end
	return true
end

Btw. IMO this script isn't important...
 
Last edited:
Back
Top