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

problem with the command !rank

Cris2387

Member
Joined
Dec 30, 2013
Messages
177
Reaction score
9
hello im trying to add this command to my server and i get this error
Code:
[4/2/2015 19:47:5] [Error - TalkAction Interface]
[4/2/2015 19:47:5] data/talkactions/scripts/ranks.lua:onSay
[4/2/2015 19:47:5] Description:
[4/2/2015 19:47:5] data/talkactions/scripts/ranks.lua:15: attempt to call global 'getHighscoreString' (a nil value)
[4/2/2015 19:47:5] stack traceback:
[4/2/2015 19:47:5]    data/talkactions/scripts/ranks.lua:15: in function <data/talkactions/scripts/ranks.lua:12>
this is the script im trying to use
Code:
local ranks = {
['fist'] = {0},
['club'] = {1},
['sword'] = {2},
['axe'] = {3},
['distance'] = {4},
['shield'] = {5},
['fish'] = {6},
['magic'] = {7},
['level'] = {8},
}
function onSay(cid, words, param)
local msg = string.lower(param)
if ranks[msg] ~= nil then
str = getHighscoreString((ranks[msg][1]))
else
str = getHighscoreString((8))
end
doShowTextDialog(cid,6500, str)
return TRUE
end
i have this in actions, highscores
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(item.actionid >= 150 and item.actionid <= 158) then
doShowTextDialog(cid, item.itemid, getHighscoreString((item.actionid - 150)))
return TRUE
end
return FALSE
end
and this in my mod folder
Code:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Highscore book" version="1.0" author="Top Maker" contact="ot-serv.forumeiros.com" enabled="yes">
<action itemid="1981" event="buffer"><![CDATA[
if(item.actionid >= 150 and item.actionid <= 158) then
doShowTextDialog(cid, item.itemid, getHighscoreString((item.actionid - 150)))
else
_result = false
end
]]></action>
<item id="1981" article="a" name="highscore book" override="yes"/>
</mod>
i dont know why is not working, i use to have it on my old server :(
 
Back
Top