Problem with a stock - 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)
+--- Thread: Problem with a stock (
/showthread.php?tid=557355)
Problem with a stock -
Saize - 13.01.2015
Hey Guys since I didnt script for a long while Iґve got a small problem with a stock Iґm trying to create.
The Compiler keeps giving me the following error on every of these lines:
Quote:
warning 202: number of arguments does not match definition
|
PHP код:
stock UpdatePlayerColor(playerid)
{
if(GetPlayerHealth(playerid) >= 90) SetPlayerColor(playerid,0x00B900FF);
if(GetPlayerHealth(playerid) >= 80) SetPlayerColor(playerid,0x009A00FF);
if(GetPlayerHealth(playerid) >= 70) SetPlayerColor(playerid,0x007300FF);
return 1;
}
But I still dont get what could be wrong, Iґm sure its kinda easy to fix but now Iґm feeling like a dumbass
Re: Problem with a stock -
Ahmad45123 - 13.01.2015
GetPlayerHealth doesn't work that way...
Check
https://sampwiki.blast.hk/wiki/GetPlayerHealth for more info to it.
pawn Код:
new Float:Health;
GetPlayerHealth(playerid, Health);
if(Health >= 90) //Contrinue :D
AW: Re: Problem with a stock -
Saize - 13.01.2015
Quote:
Originally Posted by Ahmad45123
|
Yep Iґm such a dumbass, next time I should check up the wiki first..
And thanks for the quick reply