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

Keeps crashing cause of accounts

Nirer

New Member
Joined
Aug 23, 2007
Messages
91
Reaction score
0
Location
Israel, How Unfortunate
I try to login into my player and this is what happens:
Tibia crashes and the server "says":

PHP:
[26/01/2008  20:30:45] Lua Script Error: [CreatureScript Interface] 
[26/01/2008  20:30:45] data/creaturescripts/scripts/login.lua:onLogin

[26/01/2008  20:30:45] luaRegisterCreatureEvent(). Creature not found
 
Which release or which subversion revision?
 
I'm checking what could cause this, no need to bump it.

EDIT: I don't really see anything in the file that could cause it, can you paste your data/creaturescripts/scripts/login.lua here?
 
yeah sure i'll post it in a couple of moments and edit this post...

Edit: Ok, here it is:
PHP:
function onLogin(cid)
	registerCreatureEvent(cid, "PlayerDeath")
	dofile("./config.lua")
	if sqlType == "mysql" then
		env = assert(luasql.mysql())
		con = assert(env:connect(mysqlDatabase, mysqlUser, mysqlPass, mysqlHost, mysqlPort))
	else -- sqlite
		env = assert(luasql.sqlite3())
		con = assert(env:connect(sqliteDatabase))
	end
	if serverStarted == FALSE then
		assert(con:execute("UPDATE `players` SET `online` = 0;"))
		serverStarted = TRUE
	end 
	assert(con:execute("UPDATE `players` SET `online` = `online`+1 WHERE `id` = "..getPlayerGUID(cid)..";"))
	con:close()
	env:close()
	return TRUE
end
 
yeah sure i'll post it in a couple of moments and edit this post...

Edit: Ok, here it is:
PHP:
function onLogin(cid)
	registerCreatureEvent(cid, "PlayerDeath")
	dofile("./config.lua")
	if sqlType == "mysql" then
		env = assert(luasql.mysql())
		con = assert(env:connect(mysqlDatabase, mysqlUser, mysqlPass, mysqlHost, mysqlPort))
	else -- sqlite
		env = assert(luasql.sqlite3())
		con = assert(env:connect(sqliteDatabase))
	end
	if serverStarted == FALSE then
		assert(con:execute("UPDATE `players` SET `online` = 0;"))
		serverStarted = TRUE
	end 
	assert(con:execute("UPDATE `players` SET `online` = `online`+1 WHERE `id` = "..getPlayerGUID(cid)..";"))
	con:close()
	env:close()
	return TRUE
end

Try changing it to:
Code:
function onLogin(cid)
	registerCreatureEvent(cid, "PlayerDeath")
	return TRUE
end
 
Still doesn't work sorry...
for:
PHP:
function onLogin(cid)
	registerCreatureEvent(cid, "PlayerDeath")
	return TRUE
	end
	dofile("./config.lua")
	if sqlType == "mysql" then
		env = assert(luasql.mysql())
		con = assert(env:connect(mysqlDatabase, mysqlUser, mysqlPass, mysqlHost, mysqlPort))
	else -- sqlite
		env = assert(luasql.sqlite3())
		con = assert(env:connect(sqliteDatabase))
	end
	if serverStarted == FALSE then
		assert(con:execute("UPDATE `players` SET `online` = 0;"))
		serverStarted = TRUE
	end 
	assert(con:execute("UPDATE `players` SET `online` = `online`+1 WHERE `id` = "..getPlayerGUID(cid)..";"))
	con:close()
	env:close()
	return TRUE
end
it sais:
PHP:
[27/01/2008  17:56:14] Warning: [Event::loadScript] Can not load script. data/creaturescripts/scripts/login.lua
[27/01/2008  17:56:14] data/creaturescripts/scripts/login.lua:21: '<eof>' expected near 'end'

what should i do???
 
Code:
function onLogin(cid)
    registerCreatureEvent(cid, "PlayerDeath")
    [b]return TRUE[/b]
    [b]end[/b]
Remove bolded lines...
 
I told you to replace whole the script with the lines I posted, not just throw em in somewhere in the script.
 
when i changed it only to what you gave me:

PHP:
[27/01/2008  19:44:13] Lua Script Error: [CreatureScript Interface] 
[27/01/2008  19:44:13] data/creaturescripts/scripts/login.lua:onLogin

[27/01/2008  19:44:13] luaRegisterCreatureEvent(). Creature not found
 
I believe that you've changed something in the sources, this is not normal, never happend to me. Only way I can see to fix it from the resources you've provided is:

function onLogin(cid)
--registerCreatureEvent(cid, "PlayerDeath")
return TRUE
end
 
Back
Top