HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

R2I bug ?

02-05-2008, 07:20 PM#1
Troll-Brain
i've looked in the japi folder of the jassnewgenpack
i've found that, on the custom common.j

Collapse JASS:
//fast "return bug" functions that aren't bugged
native ItoR        takes integer i returns real
native RtoI        takes real r returns integer

So how exactly the I2R and R2I are bugged ?
Because i need to use R2I like that :

Collapse JASS:
set this.yB=(R2I(this.yB*1000)/1000)

or can i use Itor on a multiplayer custom game ?
I think not, but i ask for be sure
02-05-2008, 07:42 PM#2
Captain Griffen
R2I != RtoI.

R2I works fine. RtoI creates an integer with the same bits as the real variable had.
02-05-2008, 07:54 PM#3
Troll-Brain
oh well, thx
and just to know, i can't use these custom native in a custom game (battle.net) ?
02-05-2008, 08:14 PM#4
Captain Griffen
No. Not unless the people you're playing with also have a hacked exe injecting the necessary DLLs.
02-05-2008, 11:49 PM#5
MaD[Lion]
cant we use return bug to simulate RtoI?
02-06-2008, 12:50 AM#6
Vexorian
If you have custom natives, why would you need those ? I think their only use is for location linked lists, but then, we could make a native replacement for them and that should be cool.
02-06-2008, 11:13 AM#7
MaD[Lion]
well someone said it cant be used on bnet :P And im agains all tat is not bnet :P
02-06-2008, 03:46 PM#8
Captain Griffen
You could if you were making a proper mod, I think.