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

need help please !.. in login.lua

7i7a

New Member
Joined
Feb 23, 2011
Messages
43
Reaction score
1
hello otlanders,
i need some help here, i was going to start my server online. tfs 0.3.6 crying damson and i set up database and web, but when iam trying to login with any character i found this error ;


[03/07/2012 01:07:38] Admin has logged in.

[03/07/2012 01:07:39] [Error - CreatureScript Interface]
[03/07/2012 01:07:39] data/creaturescripts/scripts/login.lua:eek:nLogin
[03/07/2012 01:07:39] Description:
[03/07/2012 01:07:39] data/creaturescripts/scripts/login.lua:14: attempt to call global 'getPlayerLastLoginSaved' (a nil value)
[03/07/2012 01:07:40] stack traceback:
[03/07/2012 01:07:40] data/creaturescripts/scripts/login.lua:14: in function <data/creaturescripts/scripts/login.lua:6>
[03/07/2012 01:07:40] Admin has logged out.



can someone help me please.. :D
here we go the script that tfs report;


Code:
local config = {
	loginMessage = getConfigValue('loginMessage'),
	useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}

function onLogin(cid)
	local loss = getConfigValue('deathLostPercent')
	if(loss ~= nil) then
		doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
	end

	local accountManager = getPlayerAccountManager(cid)
	if(accountManager == MANAGER_NONE) then
	[I][COLOR="#0000FF"][COLOR="#0000FF"][SIZE=2]--->	local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage   <---[/SIZE][/COLOR][/COLOR][/I]
		if(lastLogin > 0) then
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
			str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
		else
			str = str .. " Please choose your outfit."
			doPlayerSendOutfitWindow(cid)
		end

		doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
	elseif(accountManager == MANAGER_NAMELOCK) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
	elseif(accountManager == MANAGER_ACCOUNT) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
	end

	if(not isPlayerGhost(cid)) then
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
	end

	registerCreatureEvent(cid, "Mail")
	registerCreatureEvent(cid, "GuildMotd")

	registerCreatureEvent(cid, "Idle")
	if(config.useFragHandler) then
		registerCreatureEvent(cid, "SkullCheck")
	end

	registerCreatureEvent(cid, "ReportBug")
	registerCreatureEvent(cid, "AdvanceSave")
	return true
end
 
Back
Top Bottom