• 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 error with login.lua (its a custom login.lua)

Wezza

lua nOOb
Joined
May 31, 2008
Messages
2,278
Reaction score
31
Code:
Cannot load script (data/creaturescripts/scripts/login.lua)
data/creaturescripts/scripts/login.lua:77: 'end' expected (to close 'function' at line 7) near '<eof>'


Code:
dofile(getDataDir() .. "lib/login_checks.lua")

local config = {
	loginMessage = getConfigValue('loginMessage')
}

function onLogin(cid)

	local loss = getConfigValue('deathLostPercent')
	if(loss ~= nil) then
		local level = getPlayerLevel(cid)
		if level <= 101 then
			doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 8)
		elseif level <= 200 then
			doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 14)
		elseif level <= 300 then
			doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 17)
		elseif level <= 350 then
				doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 20)	
		else
			doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 25)
		end
	end
function vocInformation(cid)



help me please? :D
 
Last edited:
Code:
local loss = getConfigValue('deathLostPercent')

function onLogin(cid)
	local l = getPlayerLevel(cid)
	if l <= 101 then
		l = loss * 8
	elseif l <= 200 then
		l = loss * 14
	elseif l <= 300 then
		l = loss * 17
	elseif l <= 350 then
		l = loss * 20
	else
		l = loss * 25
	end
	doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, l)
	return true
end
removed everything unused
 
[07/05/2011 19:32:44] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/login.lua)
[07/05/2011 19:32:44] data/creaturescripts/scripts/login.lua:71: '<eof>' expected near 'end'

now it gives me this error
 
Back
Top