Convert Real to Formatted String

S

swedenman

Guest
Ok, so this is my trigger,

Code:
Sell Tower
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Sell Tower 
    Actions
        Player - Add (Integer(((Real((Point-value of (Triggering unit)))) x 0.75))) to (Owner of (Triggering unit)) Current gold
        Unit - Remove (Triggering unit) from the game
        Game - Display to (All players controlled by a ((Owner of (Triggering unit)) controller) player) the text: (You have recieved |cffffd700 + ((String(((Real((Point-value of (Triggering unit)))) x 0.75), 1, 2)) + ( |r gold for selling one  + ((Name of (Triggering unit)) + .))))

My problem is that it will display 3,75.. is it possible to only have it type out "3"?

Ty in advance

// The Swedish Man
 

Hero

─║╣ero─
Reaction score
250
Convert the Real to Integer

Integer's are only positive and negative numbers

No decimals and no fractions
 
S

swedenman

Guest
Convert the Real to Integer

Integer's are only positive and negative numbers

No decimals and no fractions

Ty but, I thought so too but all I can find is either "Convert Integer to Real" or "Convert Real to String", where is this Real to Integer-one? :)

EDIT: And wouldn't that convert, for example, 3.75 to 4? Is there any way to convert it down?
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
World Editor rounds all reals down, for example, 3.99 is rounded down to 3.
 
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