1warning message? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: 1warning message? (
/showthread.php?tid=256384)
1warning message? -
CrazyBlob - 20.05.2011
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
Re: 1warning message? -
LetsOWN[PL] - 20.05.2011
Here:
pawn Код:
if(GetVehicleHealth(playerid) < 1000)
Above it, make this:
pawn Код:
new vHealth;
vHealth = GetVehicleHealth(playerid);
and instead
pawn Код:
if(GetVehicleHealth(playerid) < 1000)
give
Working?
~Lets
Re: 1warning message? -
CrazyBlob - 20.05.2011
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
Re: 1warning message? -
LetsOWN[PL] - 20.05.2011
Sorry bro, but im sleepy a bit.. Remamber, which country i come from, hehe..
It's OK now
Respuesta: 1warning message? -
K9- - 20.05.2011
is [pawn ] [ /pawn]
Re: 1warning message? -
CrazyBlob - 20.05.2011
ive edited my post;P
Re: 1warning message? -
LetsOWN[PL] - 20.05.2011
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
Respuesta: 1warning message? -
K9- - 20.05.2011
pawn Код:
new Float:HealthCar;
GetVehicleHealth(playerid, HealthCar);
if( HealthCar < 1000) return SendClientMessage(playerid, Color_Error,"Your Vehicle Is Already Full Health!");
Re: 1warning message? - [03]Garsino - 20.05.2011
1. It's GetVehicleHealth(VEHICLEID) not PLAYERID.
2. The variable you want to store the health in must be a float!
Re: 1warning message? -
CrazyBlob - 20.05.2011
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?
Re: 1warning message? -
LetsOWN[PL] - 20.05.2011
Yes, ofc. Give me coords on PM.
~Lets