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

DoubleExp Error

Amiroslo

Excellent OT User
Joined
Jul 28, 2009
Messages
6,812
Solutions
6
Reaction score
822
I got this script
Code:
local level = getPlayerLevel(cid)
local storage = 77788
local value = 1.25 -- 1.25 being 125% meaning normal + 25%
function onLogin(cid) 
    if (getPlayerLastLogin(cid) == nil) then
		setPlayerStorageValue(cid, storage, 2000 + 1)
		doPlayerSendTextMessage(cid, "Buy VIP to get doubled exp") 
    elseif (isPremium(cid)) then
		setPlayerStorageValue(cid, storage, 2001 + 1)
		doPlayerSetExtraExpRate(cid, value) 
		doPlayerSendTextMessage(cid, "You are level " .. getPlayerLevel(cid) .. ". At this level your current doubled exp is " .. getExperienceStage(level) * 2 .. "experience points!") 
    end
	registerCreatureEvent(cid, "DoubleExp-Logout")
	return true
end

function onLogout(cid) 
	if (isPremium(cid) and getPlayerStorageValue(cid, storage) == 2002) then
		doPlayerSetExtraExpRate(cid, -1 * value) 
		setPlayerStorageValue(cid, storage, 2001)
    end
	return true
end

and error
Code:
[Error - CreatureScript Interface]
data/creaturescripts/scripts/DoubleExp.lua:onLogin
Description:
data/creaturescripts/scripts/DoubleExp.lua:10: attempt to call global 'doPlayerSetExtraExpRate' (a nil value)
stack traceback:
        data/creaturescripts/scripts/DoubleExp.lua:10: in function <data/creaturescripts/scripts/DoubleExp.lua:4>

[Error - CreatureScript Interface]
data/creaturescripts/scripts/DoubleExp.lua:onLogout
Description:
data/creaturescripts/scripts/DoubleExp.lua:19: attempt to call global 'doPlayerSetExtraExpRate' (a nil value)
stack traceback:
        data/creaturescripts/scripts/DoubleExp.lua:19: in function <data/creaturescripts/scripts/DoubleExp.lua:17>

im using 0.3.6pl1 8.54
 
can't you read?
PHP:
data/creaturescripts/scripts/DoubleExp.lua:10: attempt to call global 'doPlayerSetExtraExpRate' (a nil value)
 
LUA:
local level = getPlayerLevel(cid)
local storage = 77788
local value = 1.25 -- 1.25 being 125% meaning normal + 25%
function onLogin(cid) 
    if (getPlayerLastLogin(cid) == nil) then
		setPlayerStorageValue(cid, storage, 2000 + 1)
		doPlayerSendTextMessage(cid, "Buy VIP to get doubled exp") 
    elseif (isPremium(cid)) then
		setPlayerStorageValue(cid, storage, 2001 + 1)
		doPlayerSetExperienceRate(cid, value) 
		doPlayerSendTextMessage(cid, "You are level " .. getPlayerLevel(cid) .. ". At this level your current doubled exp is " .. getExperienceStage(level) * 2 .. "experience points!") 
    end
	registerCreatureEvent(cid, "DoubleExp-Logout")
	return true
end

function onLogout(cid) 
	if (isPremium(cid) and getPlayerStorageValue(cid, storage) == 2002) then
		doPlayerSetExperienceRate(cid, -1 * value) 
		setPlayerStorageValue(cid, storage, 2001)
    end
	return true
end
 
Code:
[Error - CreatureScript Interface]
data/creaturescripts/scripts/DoubleExp.lua
Description:
(internalGetPlayerInfo) Player not found when requesting player info #3

[Error - CreatureScript Interface]
data/creaturescripts/scripts/DoubleExp.lua
Description:
(internalGetPlayerInfo) Player not found when requesting player info #3
 
Back
Top