Problem with 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)
+--- Thread: Problem with floats (
/showthread.php?tid=475231)
Problem with floats -
moof2010 - 11.11.2013
Hi guys,
I trying to do something and now i don't know where i mistake.
Код:
forward Continue(playerid,Float:x,Float:y,Float:z,Float:x2,Float:y2,Float:z2,cpbusnou);
public Continue(playerid,Float:x,Float:y,Float:z,Float:x2,Float:y2,Float:z2,cpbusnou)
{
GivePlayerMoney(playerid, random(1000) + 1000);
DisablePlayerRaceCheckpoint(playerid);
buscp[playerid] = cpbusnou;
SCM(playerid, CRISTIAN, "** Mergi la urmatoarea locatie.");
SetPlayerRaceCheckpoint(playerid, 0, Float:x,Float:y,Float:z, Float:x2,Float:y2,Float:z2, 4.0);
return 1;
}
Код:
if(buscp[playerid]==1)
{
SCM(playerid, CRISTIAN, "** Trebuie sa astepti in statie ca sa primesti bani.");
new Float:x = 1855.505;
new Float:y = -1385.385;
new Float:z = 13.495;
new Float:x2 = 1767.444;
new Float:y2 = -1163.706;
new Float:z2 = 23.749;
new cpbusnou = 3;
SetTimerEx("Continue",4000,false,"i",playerid,Float:x,Float:y,Float:z,Float:x2,Float:y2,Float:z2,cpbusnou);
}
i want to send the coordonates to public continue
i don't have sintactic errors, the new checkpoint have default coordonates 0,0,0
Re: Problem with floats -
Kimossab - 11.11.2013
change the "i" with "iffffffi". It's 6 f
Re: Problem with floats -
moof2010 - 12.11.2013
It works, thank you very much, and i understood what means i,f,f,f,f,f,f,i.... it's format of my variables no ?
Re: Problem with floats -
Loot - 12.11.2013
Yes.
Quote:
Originally Posted by ******
Specifier(s) | Name | Example values | b | Binary | 01001, 0b1100 | c | Character | a, o, * | f | Float | 0.7, -99.5 | g | IEEE Float | 0.7, -99.5, INFINITY, -INFINITY, NAN, NAN_E | h, x | Hex | 1A, 0x23 | i, d | Integer | 1, 42, -10 | l | Logical | true, false | n | Number | 42, 0b010, 0xAC, 045 | o | Octal | 045 12 | q | Bot name/id | ShopBot, 27 | r | Player name/id | ******, 42 | u | User name/id (bots and players) | ******, 0 |
|