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

addAnimatedText Formula Error

Helliot1

Owner of Empire Online
Joined
Jul 26, 2017
Messages
315
Solutions
1
Reaction score
57
Hello,

Trying to add an animated text when I use some potion, but it don't work.

I'm using OTX3 8.6, and found this function on this website: otxserver-luascript

Lua:
if potion.mana then
    manaToAdd = math.random(potion.mana[1], potion.mana[2])
    doPlayerAddMana(player, manaToAdd)
    g_game.addAnimatedText(manaToAdd, player:getPosition(), TEXTCOLOR_BLUE)
end


Somebody can help me please?
Thanks guys!!
 
Solution
Change
Lua:
g_game.addAnimatedText(manaToAdd, player:getPosition(), TEXTCOLOR_BLUE)
To
Lua:
Game.sendAnimatedText(manaToAdd, player:getPosition(), TEXTCOLOR_BLUE)
Lua:
Game.sendAnimatedText(message, position, color)
It doesn't work on clients above 9.6.
 
Change
Lua:
g_game.addAnimatedText(manaToAdd, player:getPosition(), TEXTCOLOR_BLUE)
To
Lua:
Game.sendAnimatedText(manaToAdd, player:getPosition(), TEXTCOLOR_BLUE)
 
Solution
Back
Top