Problem with a stock
#1

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) >= 80SetPlayerColor(playerid,0x009A00FF);
    if(
GetPlayerHealth(playerid) >= 70SetPlayerColor(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
Reply
#2

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
Reply
#3

Quote:
Originally Posted by Ahmad45123
Посмотреть сообщение
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
Yep Iґm such a dumbass, next time I should check up the wiki first..

And thanks for the quick reply
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)