4 warnings
#1

Код:
C:\Program Files\SAMP Server\gamemodes\estprojekt.pwn(6511) : warning 202: number of arguments does not match definition
C:\Program Files\SAMP Server\gamemodes\estprojekt.pwn(6532) : warning 202: number of arguments does not match definition
C:\Program Files\SAMP Server\gamemodes\estprojekt.pwn(6561) : warning 202: number of arguments does not match definition
C:\Program Files\SAMP Server\gamemodes\estprojekt.pwn(6582) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Warnings.
6511
Код:
if(GetPlayerHealth(playerid) >= 1)
6532
Код:
if(GetPlayerHealth(playerid) >= 1)
6561
Код:
if(GetPlayerHealth(playerid) >= 1)
6582
Код:
if(GetPlayerHealth(playerid) >= 1)
Reply
#2

You're not using GetPlayerHealth correctly.
pawn Код:
new Float:playerHealth;
GetPlayerHealth(playerid, playerHealth);
if(playerHealth >= 1)
{
//blah
}
Reply
#3

Yeah the above post should work, if it doesn't post back.
Reply
#4

Use the samp wiki next time,ok?
Reply
#5

Quote:
Originally Posted by Sky4D
Посмотреть сообщение
You're not using GetPlayerHealth correctly.
pawn Код:
new Float:playerHealth;
GetPlayerHealth(playerid, playerHealth);
if(playerHealth >= 1)
{
//blah
}
Код:
C:\Program Files\SAMP Server\gamemodes\estprojekt.pwn(6513) : warning 202: number of arguments does not match definition
C:\Program Files\SAMP Server\gamemodes\estprojekt.pwn(6534) : warning 202: number of arguments does not match definition
C:\Program Files\SAMP Server\gamemodes\estprojekt.pwn(6565) : warning 202: number of arguments does not match definition
C:\Program Files\SAMP Server\gamemodes\estprojekt.pwn(6586) : warning 202: number of arguments does not match definition
:/ Still 4 warnings.

Quote:
Originally Posted by michaelw352
Посмотреть сообщение
Use the samp wiki next time,ok?
Go fuck your mom up, retard.
Reply
#6

Quote:
Originally Posted by Typhome
Посмотреть сообщение
Код:
C:\Program Files\SAMP Server\gamemodes\estprojekt.pwn(6513) : warning 202: number of arguments does not match definition
C:\Program Files\SAMP Server\gamemodes\estprojekt.pwn(6534) : warning 202: number of arguments does not match definition
C:\Program Files\SAMP Server\gamemodes\estprojekt.pwn(6565) : warning 202: number of arguments does not match definition
C:\Program Files\SAMP Server\gamemodes\estprojekt.pwn(6586) : warning 202: number of arguments does not match definition
:/ Still 4 warnings but new warning.
Is it on the same lines?
Reply
#7

It's about:

GetPlayerHealth(playerid, VehicleHealthStack[vehicleid][2]);
SetPlayerHealth(playerid, floatsub(VehicleHealthStack[vehicleid][2], 6));
if(GetPlayerHealth(playerid) >= 1)

Yes same line
Reply
#8

Quote:
Originally Posted by Typhome
Посмотреть сообщение
It's about:

GetPlayerHealth(playerid, VehicleHealthStack[vehicleid][2]);
SetPlayerHealth(playerid, floatsub(VehicleHealthStack[vehicleid][2], 6));
if(GetPlayerHealth(playerid) >= 1)

Yes same line
You're still doing it wrong.

pawn Код:
GetPlayerHealth(playerid, VehicleHealthStack[vehicleid][2]);
SetPlayerHealth(playerid, floatsub(VehicleHealthStack[vehicleid][2], 6));
if(VehicleHealthStack[vehicleid][2] >= 1)
Something like that.
Reply
#9

Full code at 2 warning's:

Код:
public VehicleDamageToPlayerHealth(playerid, vehicleid)
{
   	if (IsPlayerInVehicle(playerid,vehicleid))
	{
		if(Seatbelt[playerid] == 1)
		{
  			GetVehicleHealth(vehicleid, VehicleHealthStack[vehicleid][0]);
   			if (floatcmp(VehicleHealthStack[vehicleid][0], VehicleHealthStack[vehicleid][1]) == -1)
    		{
    	       	GetPlayerHealth(playerid, VehicleHealthStack[vehicleid][2]);
    	       	SetPlayerHealth(playerid, floatsub(VehicleHealthStack[vehicleid][2], 6));
    	       	if(GetPlayerHealth(playerid) >= 1)
				{
				    SendClientMessage(playerid,COLOR_CORAL,"You are shook up from the collision.");
				    SendClientMessage(playerid,COLOR_CORAL,"Luckily, you were wearing your seatbelt and may continue driving.");
				}
				else
				{
				    SendClientMessage(playerid,COLOR_CORAL,"Your stamina was in bad condition and the force of the collision knocked you out.");
					GameTextForPlayer(playerid,"~r~Out ~w~cold",4000,1);
				}
    		}
    	   	VehicleHealthStack[vehicleid][1] = VehicleHealthStack[vehicleid][0];
    	   	return 1;
   		}
		else
		{
			GetVehicleHealth(vehicleid, VehicleHealthStack[vehicleid][0]);
   			if (floatcmp(VehicleHealthStack[vehicleid][0], VehicleHealthStack[vehicleid][1]) == -1)
    		{
    	       	GetPlayerHealth(playerid, VehicleHealthStack[vehicleid][2]);
    	       	SetPlayerHealth(playerid, floatsub(VehicleHealthStack[vehicleid][2], 45));
    	       	if(GetPlayerHealth(playerid) >= 1)
				{
				    SendClientMessage(playerid,COLOR_CORAL,"You are shook up from the collision.");
				    SendClientMessage(playerid,COLOR_CORAL,"You can not continue driving, as you are frozen from shock. Buckle up, next time.");
					TogglePlayerControllable(playerid, 0);
					TimerStack = SetTimerEx("DisablePlayerKnockout",3500,1,"i",playerid);
				}
				else
				{
				    SendClientMessage(playerid,COLOR_CORAL,"Your stamina was in bad condition and the force of the collision knocked you out.");
					GameTextForPlayer(playerid,"~r~Out ~w~cold",4000,1);
				}
    		}
    	   	VehicleHealthStack[vehicleid][1] = VehicleHealthStack[vehicleid][0];
    	   	return 1;
		}
	}
	return 1;
}
Reply
#10

Quote:
Originally Posted by Typhome
Посмотреть сообщение
Код:
C:\Program Files\SAMP Server\gamemodes\estprojekt.pwn(6513) : warning 202: number of arguments does not match definition
C:\Program Files\SAMP Server\gamemodes\estprojekt.pwn(6534) : warning 202: number of arguments does not match definition
C:\Program Files\SAMP Server\gamemodes\estprojekt.pwn(6565) : warning 202: number of arguments does not match definition
C:\Program Files\SAMP Server\gamemodes\estprojekt.pwn(6586) : warning 202: number of arguments does not match definition
:/ Still 4 warnings.



Go fuck your mom up, retard.
How about you stop being a rude prick or get the fuck off these forums? The previous poster was completely correct, you should ALWAYS check the wiki first, there is nothing wrong with his post that warranted your vulgar comment.

You warnings are from you not having the right set of parameters (check the wiki on the functions that are giving the warnings to see their parameters).
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)