Using methods on struct Array

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
JASS:
method M2P takes integer Min returns real 
     return 0.01 - (this.Min/50000)
endmethod

i tried to use the method above on struct array and for some reason it keeps returning 0.01 even though Min is changed....

is there anything i should know about the use of methods with struct array?
 

Trollvottel

never aging title
Reaction score
262
(this.Min/50000)

->

(this.Min/50000.)

maybe it considered it as integer division and reals which are between 0 and 1 become 0 as integers because integers just cut off everything behind the point.




why does it take an argument which you dont use?
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
i just figured it out that i should use I2R before dividing and the argument was for a test and i forgot to remove....

thanks anyway for the answer +Rep
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top