SA-MP Forums Archive
RandomEx Floats - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: RandomEx Floats (/showthread.php?tid=189769)



RandomEx Floats - Th3Angel - 13.11.2010

I'm trying to use randomEx to get a number between two floats(X and Y coordinates). These floats are stored in a huge array.
Ex.
X = randomEx(SAZones[rand][1], SAZones[rand][4]);
Y = randomEx(SAZones[rand][2], SAZones[rand][5]);

I'm getting a tag mismatch error and I know that the floats have to be integers because randomEx only accepts integers. Does anyone know how to do this?


Re: RandomEx Floats - gr56 - 13.11.2010

look at this
Quote:
Originally Posted by [nl]daplayer
Посмотреть сообщение
pawn Код:
new Float:x = 1.0 + random(10);
new Float:y = 2.0 + random(11);
new Float:z = 4.0;
It's just an example, so it's not useable :P



Re: RandomEx Floats - Th3Angel - 13.11.2010

Yea, but I want to use randomEx. Not random.