1warning message?
#1

im making a /repair command and when you type it i want it so if your vehicle health is 1000 you cant

Код:
if(GetVehicleHealth(playerid) < 1000) return SendClientMessage(playerid,COLOR_RED,"Your Vehicle Is Already Full Health!");
but i get the warning?

Код:
C:\Users\********\Desktop\********\gamemodes\ct.pwn(766) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
please help ty
Reply
#2

Here:
pawn Код:
if(GetVehicleHealth(playerid) < 1000)
Above it, make this:
pawn Код:
new vHealth;
vHealth = GetVehicleHealth(playerid);
and instead
pawn Код:
if(GetVehicleHealth(playerid) < 1000)
give
pawn Код:
if(vHealth < 1000)
Working?

~Lets
Reply
#3

Quote:
Originally Posted by LetsOWN[PL]
Посмотреть сообщение
Here:
[pawno]if(GetVehicleHealth(playerid) < 1000)[/pawno]

Above it, make this:
[pawno]new vHealth;
vHealth = GetVehicleHealth(playerid);
[/pawno]

and instead
[pawno]if(GetVehicleHealth(playerid) < 1000)[/pawno]
give
[pawno]if(vHealth < 1000)[/pawno]
Working?

~Lets
i put it

Код:
 		    new vHealth;
			vHealth = GetVehicleHealth(playerid);//<-- line 767
			if(vHealth < 1000) return SendClientMessage(playerid,COLOR_RED,"Your Vehicle Is Already Full Health!");
and i got this warning


Код:
C:\Users\**********\Desktop\*********\gamemodes\ct.pwn(767) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
:Z
Reply
#4

Sorry bro, but im sleepy a bit.. Remamber, which country i come from, hehe..
It's OK now
Reply
#5

is [pawn ] [ /pawn]
Reply
#6

ive edited my post;P
Reply
#7

Yeh, i've seen.
I did mistake in my code (i go sleep immediatley!!!)
Here's correctly:

pawn Код:
new Float:VehHealth;
GetVehicleHealth(playerid, VehHealth);
if(VehHealth >= 1000.0)
return //whatever
Reply
#8

pawn Код:
new Float:HealthCar;
 GetVehicleHealth(playerid, HealthCar);
 if( HealthCar < 1000) return SendClientMessage(playerid, Color_Error,"Your Vehicle Is Already Full Health!");
Reply
#9

1. It's GetVehicleHealth(VEHICLEID) not PLAYERID.
2. The variable you want to store the health in must be a float!
Reply
#10

Quote:
Originally Posted by LetsOWN[PL]
Посмотреть сообщение
Yeh, i've seen.
I did mistake in my code (i go sleep immediatley!!!)
Here's correctly:

pawn Код:
new Float:VehHealth;
GetVehicleHealth(playerid, VehHealth);
if(VehHealth >= 1000.0)
return //whatever
same warning ;( can we teamviewer it?
Reply
#11

Yes, ofc. Give me coords on PM.

~Lets
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)