Don't want to compile =(
#1

Код:
Here is the Speedo-->>>

[cod]
#define MPS 			0
#define KMPH 			1
#define MPH 			2
#define KNOTS 			3

#define SPEED			KMPH

new Float:ppos[MAX_PLAYERS][3];

Gamemodeinit-->
SetTimer("Speed",1000,true);


public Speed(){
  for(new i=0;i<MAX_PLAYERS;i++){
		if(IsPlayerConnected(i)){
			new Float:x,Float:y,Float:z;
			GetPlayerPos(i,x,y,z);
			new Float:dis = floatsqroot(floatpower(floatabs(floatsub(ppos[i][0],x)),2)+ floatpower(floatabs(ppos[i][1],y)),2)+floatpower(floatabs(floatsub(ppos[i][2],z)),2));
			new tmpstr[256];
			#if SPEED == MPS
			format(tmpstr,sizeof(tmpstr),"~n~~n~~n~~n~					%d~r~MPS",floatround(dis));
			#endif
			#if SPEED == KMPH
			format(tmpstr,sizeof(tmpstr),"~n~~n~~n~~n~					%d  ~r~KMPH",floatround(((dis/1000.0)*60.0)*60.0);
			#endif
			#if SPEED == MPH
			format(tmpstr,sizeof(tmpstr),"~n~~n~~n~~n~					%d ~r~MPH",floatround(((dis/1000.0)*60.0)*60.0)*(5.0/8.0));
			#endif
			#if SPEED == KNOTS
			format(tmpstr,sizeof(tmpstr),"~n~~n~~n~~n~					%d ~r~KNOTS",floatround((((dis/1000.0)*60.0)*60.0)/1.85));
			#endif
            if(IsPlayerInAnyVehicle(i)) GameTextForPlayer(i,tmpstr,2000,4);
            ppos[i][0] = x;
            ppos[i][1] = y;
            ppos[i][2] = z;
		}
	}
}

But I got these errors:
C:\Dokumente und Einstellungen\Besitzer\Desktop\gangdm.pwn(2049) : error 001: expected token: ";", but found ")"
C:\Dokumente und Einstellungen\Besitzer\Desktop\gangdm.pwn(2049) : error 029: invalid expression, assumed zero
C:\Dokumente und Einstellungen\Besitzer\Desktop\gangdm.pwn(2049) : warning 215: expression has no effect
C:\Dokumente und Einstellungen\Besitzer\Desktop\gangdm.pwn(2055) : error 001: expected token: ",", but found ";"

On this line:
Код:
new Float:dis = floatsqroot(floatpower(floatabs(floatsub(ppos[i][0],x)),2)+ floatpower(floatabs(ppos[i][1],y)),2)+floatpower(floatabs(floatsub(ppos[i][2],z)),2));
Reply


Messages In This Thread
Don't want to compile =( - by Bearfist - 22.04.2009, 21:24
Re: Don't want to compile =( - by sidhu123 - 22.04.2009, 21:49
Re: Don't want to compile =( - by Bearfist - 22.04.2009, 22:04
Re: Don't want to compile =( - by sidhu123 - 22.04.2009, 22:18
Re: Don't want to compile =( - by ICECOLDKILLAK8 - 22.04.2009, 22:39
Re: Don't want to compile =( - by Bearfist - 23.04.2009, 04:55

Forum Jump:


Users browsing this thread: 2 Guest(s)