PlayerInfo...Help...Fix it pls
#1

Hello!

Can someone fix my code? I get 4 errors on this line...

Line:

PHP код:
    format(str2sizeof(str2), "{E61A1A}Kills:{DFF709} %d {E61A1A}Deaths:{DFF709} %d"PLAYER_KILLS(player1), PLAYER_DEATHS(player1)); 
Errors:

PHP код:
C:\Users\tadej\Desktop\SA-MP Server\gamemodes\New.pwn(1097) : error 012invalid function callnot a valid address
C
:\Users\tadej\Desktop\SA-MP Server\gamemodes\New.pwn(1097) : warning 215expression has no effect
C
:\Users\tadej\Desktop\SA-MP Server\gamemodes\New.pwn(1097) : error 001expected token";"but found ")"
C:\Users\tadej\Desktop\SA-MP Server\gamemodes\New.pwn(1097) : error 029invalid expressionassumed zero
C
:\Users\tadej\Desktop\SA-MP Server\gamemodes\New.pwn(1097) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors

This is the whole code:

Code:

PHP код:
CMD:playerinfo(playeridparams[])
{
    if(
gPlayerInfo[playerid][PLAYER_LEVEL] < 2)return SendClientMessage(playeridCOLOR_RED,"You are Not Allowed To Use This Command!");
    new 
player1string[120], str[120], str1[60], str2[200];
    if(
sscanf(params,"d"player1)) return SendClientMessage(playeridCOLOR_ORANGE,"Usage: /playerinfo [playerid] ");
    if(!
IsPlayerConnected(player1)) return SendClientMessage(playeridCOLOR_RED,"ERROR: This Player is Not Connected!");
    new 
Float:healthFloat:armourFloat:xFloat:yFloat:z;
    
GetPlayerPos(player1xyz);
    
GetPlayerArmour(player1armour);
    
GetPlayerHealth(player1health);
    
format(stringsizeof(string), "| ----------- Player's Informations -------- |");
    
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
    
format(strsizeof(str),"Health:{DFF709} %1f {E61A1A}Armour:{DFF709} %1f {E61A1A}Money:{DFF709} $%d {E61A1A}Score:{DFF709} %d"healtharmourGetPlayerMoney(player1), GetPlayerScore(player1));
    
SendClientMessage(playeridCOLOR_LIGHTREDstr);
    
format(str1sizeof(str1),"Position:{DFF709} %1f, %1f, %1f"xyz);
    
SendClientMessage(playeridCOLOR_LIGHTREDstr1);
    
format(str2sizeof(str2), "{E61A1A}Kills:{DFF709} %d {E61A1A}Deaths:{DFF709} %d"PLAYER_KILLS(player1), PLAYER_DEATHS(player1));
    
SendClientMessage(playeridCOLOR_LIGHTREDstr2);
    return 
1;

Thanks for your help
Reply


Messages In This Thread
PlayerInfo...Help...Fix it pls - by Areax - 13.04.2013, 13:49
Re: PlayerInfo...Help...Fix it pls - by Pottus - 13.04.2013, 13:57
Re: PlayerInfo...Help...Fix it pls - by Areax - 13.04.2013, 13:58
Re: PlayerInfo...Help...Fix it pls - by Areax - 13.04.2013, 14:11
Re: PlayerInfo...Help...Fix it pls - by RootKiller - 13.04.2013, 14:16
Re: PlayerInfo...Help...Fix it pls - by Areax - 13.04.2013, 14:16
Re: PlayerInfo...Help...Fix it pls - by Pottus - 13.04.2013, 14:22
Re: PlayerInfo...Help...Fix it pls - by Areax - 13.04.2013, 14:25

Forum Jump:


Users browsing this thread: 1 Guest(s)