Real to Integer Vaules

TideOfChaos

New Member
Reaction score
25
Floating Text - Create floating text that reads (String((Integer((Abs(_TempReal)))))) at (Position of (Target unit of ability being cast)) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency

That seems to return an incorrect vaule, something like 21.00 becomes 2100.
I tried it with just '_TempReal' which works fine, but that isn't the effect I want. I need it in a whole value. (15 not 15.00)

Any suggestions?
 

MorbazanRhot

New Member
Reaction score
7
Well, I use this:

Trigger:
  • Floating Text - Create floating text that reads (String(((500 x (Level of Disruption Aura for TheWiz)) + WizardSpellDamage))) above (Casting unit) with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency


and it doesn't show decimal places. The difference being that mine starts as an integer, but if you don't want decimal places that probably means that whatever formula results in your variable wouldn't allow for decimals, so couldn't you just make your variable an integer instead of a real in the first place? That may fix the problem.
 

Dirac

22710180
Reaction score
147
im SURE that the variable has the wrong data, its impossible to display 2100 instead of 21.

... Abs? what is that? just transform it into integer
 

TideOfChaos

New Member
Reaction score
25
@Dirac
abs() is absolute value. In other words, it is the whole number.

Heh, turns out my value was wrong anyway >.>
 

xxxtrickyxxx

(o Y o)
Reaction score
64
absolute value returns the value of the variable as a non negative value. as a side note, if you are still getting any .0's on your number and you do not want them there, then you need to either use substring 1,2 or string to real format.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top