13.04.2013, 13:49
Hello!
Can someone fix my code? I get 4 errors on this line...
Line:
Errors:
This is the whole code:
Code:
Thanks for your help
Can someone fix my code? I get 4 errors on this line...
Line:
PHP код:
format(str2, sizeof(str2), "{E61A1A}Kills:{DFF709} %d {E61A1A}Deaths:{DFF709} %d", PLAYER_KILLS(player1), PLAYER_DEATHS(player1));
PHP код:
C:\Users\tadej\Desktop\SA-MP Server\gamemodes\New.pwn(1097) : error 012: invalid function call, not a valid address
C:\Users\tadej\Desktop\SA-MP Server\gamemodes\New.pwn(1097) : warning 215: expression has no effect
C:\Users\tadej\Desktop\SA-MP Server\gamemodes\New.pwn(1097) : error 001: expected token: ";", but found ")"
C:\Users\tadej\Desktop\SA-MP Server\gamemodes\New.pwn(1097) : error 029: invalid expression, assumed zero
C:\Users\tadej\Desktop\SA-MP Server\gamemodes\New.pwn(1097) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
Code:
PHP код:
CMD:playerinfo(playerid, params[])
{
if(gPlayerInfo[playerid][PLAYER_LEVEL] < 2)return SendClientMessage(playerid, COLOR_RED,"You are Not Allowed To Use This Command!");
new player1, string[120], str[120], str1[60], str2[200];
if(sscanf(params,"d", player1)) return SendClientMessage(playerid, COLOR_ORANGE,"Usage: /playerinfo [playerid] ");
if(!IsPlayerConnected(player1)) return SendClientMessage(playerid, COLOR_RED,"ERROR: This Player is Not Connected!");
new Float:health, Float:armour, Float:x, Float:y, Float:z;
GetPlayerPos(player1, x, y, z);
GetPlayerArmour(player1, armour);
GetPlayerHealth(player1, health);
format(string, sizeof(string), "| ----------- Player's Informations -------- |");
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(str, sizeof(str),"Health:{DFF709} %1f {E61A1A}Armour:{DFF709} %1f {E61A1A}Money:{DFF709} $%d {E61A1A}Score:{DFF709} %d", health, armour, GetPlayerMoney(player1), GetPlayerScore(player1));
SendClientMessage(playerid, COLOR_LIGHTRED, str);
format(str1, sizeof(str1),"Position:{DFF709} %1f, %1f, %1f", x, y, z);
SendClientMessage(playerid, COLOR_LIGHTRED, str1);
format(str2, sizeof(str2), "{E61A1A}Kills:{DFF709} %d {E61A1A}Deaths:{DFF709} %d", PLAYER_KILLS(player1), PLAYER_DEATHS(player1));
SendClientMessage(playerid, COLOR_LIGHTRED, str2);
return 1;
}