/gethp
#1

Код:
CMD:gethp(playerid, params[])
{
    new string[128], ID, Float:health; //Define string, ID & health float.
	if(sscanf(params, "u", ID)) SendClientMessage(playerid, -1, "Correct usage: /gethp <playerid/name>"); //Show a message with correct usage of the command, if inputted wrong.
	else if(!IsPlayerConnected(ID)) SendClientMessage(playerid, -1, "That player is not online."); //Output if ID is not online.
    else //If everything has gone fine, do this.
    {
        GetPlayerHealth(ID, health); //Store health in health float.
        format(string,sizeof(string), "%s health:%f.", PlayerName(ID),health); //String to store the output (Health will output as eg. 100.0000, as it is a float)
        SendClientMessage(playerid, -1, string); //Output string to the client.
    }
    return 1;
}
Код:
pawno\include\PPC_PlayerCommands.inc(5336) : error 012: invalid function call, not a valid address
include\PPC_PlayerCommands.inc(5336) : warning 215: expression has no effect
include\PPC_PlayerCommands.inc(5336) : error 001: expected token: ";", but found ")"
\include\PPC_PlayerCommands.inc(5336) : error 029: invalid expression, assumed zero
\pawno\include\PPC_PlayerCommands.inc(5336) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply


Messages In This Thread
/gethp - by DerickClark - 05.03.2013, 02:04
Respuesta: /gethp - by Strier - 05.03.2013, 02:18
Re: /gethp - by DerickClark - 05.03.2013, 02:19
Respuesta: /gethp - by Strier - 05.03.2013, 02:26
Re: /gethp - by DerickClark - 05.03.2013, 02:28
Re : /gethp - by DaTa[X] - 05.03.2013, 02:37
Re: /gethp - by Glad2BeHere - 05.03.2013, 02:49
Re: /gethp - by DerickClark - 05.03.2013, 21:09
Re: /gethp - by L.Hudson - 05.03.2013, 21:11
Re: /gethp - by DerickClark - 05.03.2013, 21:16

Forum Jump:


Users browsing this thread: 1 Guest(s)