Problem with floats
#1

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
Reply
#2

change the "i" with "iffffffi". It's 6 f
Reply
#3

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 ?
Reply
#4

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)