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

Action Extra exp rate scroll

Still error

PHP:
[29/10/2009 19:13:09] Lua Script Error: [Action Interface] 
[29/10/2009 19:13:09] data/actions/scripts/other/expitem.lua:onUse

[29/10/2009 19:13:10] data/actions/scripts/other/expitem.lua:8: attempt to call global 'getPlayerExtraExpRate' (a nil value)
[29/10/2009 19:13:11] stack traceback:
[29/10/2009 19:13:11] 	data/actions/scripts/other/expitem.lua:8: in function <data/actions/scripts/other/expitem.lua:6>
 
@Up: What server you use?

Actually you are checking his extraexp..
You must do

Lua:
getExperienceStage(getPlayerLevel(cid)) + 5

Try this one

Lua:
function onUse(cid, item)
local config = {
    item = 1958,
    count = 1,
    rate = 5
}
        if doPlayerRemoveItem(cid, config.item, config.count) == true then            
                setPlayerExtraExpRate(cid, getExperienceStage(getPlayerLevel(cid)) + config.rate)
                doSendAnimatedText(getCreaturePosition(cid), "+" ..config.rate.., TEXTCOLOR_RED)
                doPlayerSendTextMessage(cid, 19, "You have now extra exp rate [".. getPlayerExtraExpRate(cid) .."]")
        end
        return true
end
 
[up} Dosnt work ;p

Code:
[29/10/2009 20:01:40] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/extra.lua)
[29/10/2009 20:01:40] data/actions/scripts/extra.lua:9: unexpected symbol near ','
 
omg
Lua:
function onUse(cid, item)
local config = {
    item = 1958,
    count = 1,
    rate = 5
}
        if(doPlayerRemoveItem(cid, config.item, config.count) == true) then            
                setPlayerExtraExpRate(cid, getPlayerExtraExpRate(cid) + config.rate)
                doSendAnimatedText(getPlayerPosition(cid), "+["..config.rate.."]", TEXTCOLOR_RED)
                doPlayerSendTextMessage(cid, 19, "You have now extra exp rate [".. getPlayerExtraExpRate(cid) .."]")
        end
        return true
end
Should work now.
 
Last edited:
Still doesn't work:

Code:
[29/10/2009 20:28:18] Lua Script Error: [Action Interface] 
[29/10/2009 20:28:18] data/actions/scripts/extra.lua:onUse

[29/10/2009 20:28:18] data/actions/scripts/extra.lua:8: attempt to call global 'setPlayerExtraExpRate' (a nil value)
[29/10/2009 20:28:18] stack traceback:
[29/10/2009 20:28:18] 	data/actions/scripts/extra.lua:8: in function <data/actions/scripts/extra.lua:1>
 
PHP:
[29/10/2009 20:29:47] Lua Script Error: [Action Interface] 
[29/10/2009 20:29:48] data/actions/scripts/other/expitem.lua:onUse

[29/10/2009 20:29:48] data/actions/scripts/other/expitem.lua:8: attempt to call global 'getPlayerExtraExpRate' (a nil value)
[29/10/2009 20:29:49] stack traceback:
[29/10/2009 20:29:49] 	data/actions/scripts/other/expitem.lua:8: in function <data/actions/scripts/other/expitem.lua:1>



Error again, using the latest TFS
 
I dont really know. I can't see any problwm with script. Maybe the expCheck function isn't working or it's me who dont know how to use it. I'm sure I'm doing correct.

Edit try this last.

Lua:
local config = {
    item = 1958,
    count = 1
}
local rate = 5
 function onUse(cid, item)

        if(doPlayerRemoveItem(cid, config.item, config.count) == true) then            
                setPlayerExtraExpRate(cid, rate)
                doSendAnimatedText(getPlayerPosition(cid), "+["..config.rate.."]", TEXTCOLOR_RED)
                doPlayerSendTextMessage(cid, 19, "You have now extra exp rate [".. getPlayerExtraExpRate(cid) .."]")
        end
        return true
end
 
Last edited:
Still doesn't work...
Code:
[29/10/2009 20:48:34] Lua Script Error: [Action Interface] 
[29/10/2009 20:48:34] data/actions/scripts/extra.lua:onUse

[29/10/2009 20:48:34] data/actions/scripts/extra.lua:8: attempt to call global 'setPlayerExtraExpRate' (a nil value)
[29/10/2009 20:48:34] stack traceback:
[29/10/2009 20:48:35] 	data/actions/scripts/extra.lua:8: in function <data/actions/scripts/extra.lua:1>
 
PHP:
[29/10/2009 20:45:42] Lua Script Error: [Action Interface] 
[29/10/2009 20:45:43] data/actions/scripts/other/expitem.lua:onUse

[29/10/2009 20:45:44] data/actions/scripts/other/expitem.lua:8: attempt to call global 'setPlayerExtraExpRate' (a nil value)
[29/10/2009 20:45:44] stack traceback:
[29/10/2009 20:45:45] 	data/actions/scripts/other/expitem.lua:8: in function <data/actions/scripts/other/expitem.lua:1>

Still not working, thanks for trying though :)
 
Edit:
Code:
[29/10/2009 20:52:01] Lua Script Error: [Action Interface] 
[29/10/2009 20:52:01] data/actions/scripts/extra.lua:onUse

[29/10/2009 20:52:01] data/actions/scripts/extra.lua:9: attempt to call global 'setPlayerExtraExpRate' (a nil value)
[29/10/2009 20:52:01] stack traceback:
[29/10/2009 20:52:01] 	data/actions/scripts/extra.lua:9: in function <data/actions/scripts/extra.lua:6>
 
Code:
[29/10/2009 21:03:59] Lua Script Error: [Action Interface] 
[29/10/2009 21:03:59] data/actions/scripts/extra.lua:onUse

[29/10/2009 21:03:59] data/actions/scripts/extra.lua:9: attempt to call global 'setPlayerExtraExpRate' (a nil value)
[29/10/2009 21:03:59] stack traceback:
[29/10/2009 21:03:59] 	data/actions/scripts/extra.lua:9: in function <data/actions/scripts/extra.lua:6>
 
Back
Top