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

Lua getPlayerRates(cid) returns not same value

GhostWD

I'm in love with the var_dump()
Joined
Jan 25, 2009
Messages
185
Solutions
6
Reaction score
29
Hi there!

I'm wondering why getPlayerRates(cid) returns me freaky number not same which i set by doPlayerSetRate

Lua:
function onSay(cid, words, param, channel)
local rates = getPlayerRates(cid)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, rates[SKILL_SWORD].." sword rate")
if param == 'set' then
doPlayerSetRate(cid, SKILL_SWORD, 1.15)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, getPlayerRates(cid)[SKILL_SWORD].." sword rate")
end

return true
end

when i use this script without param and i haven't changed rate its ok but when i change it i recive
1.1499999761581 sword rate
why it is not
1.15 sword rate

is it okay? TFS 0.4
 
Back
Top