27.02.2010, 14:57
I have problems with this error.
Line 1495:
Code:
D:\DOCUME~1\ANDY~1\MYDOC~1\_UF_SF~1\GAMEMO~1\_UF_SF~1.PWN(1495) : error 076: syntax error in the expression, or invalid function call Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
pawn Code:
And this is the script:
if(strcmp(cmd, "/stats", true) == 0)
{
new idplayer;
tmp2 = strtok(cmdtext, idx);
if(!strlen(tmp2))
{
ShowStats(playerid);
return 1;
}
idplayer = strval(tmp2);
if(IsPlayerConnected(idplayer))
{
new playername[MAX_PLAYER_NAME];
GetPlayerName(idplayer, playername, sizeof(playername));
format(string, sizeof(string), "%s's Stats: Kills: %d | Deaths: %d | Ratio: %0.2f | Money: $%d | Health: | Armour: | IP: ",playername,pInfo[idplayer][pKills],pInfo[idplayer][pDeaths],Float:pInfo[idplayer][pKills]/Float:pInfo[idplayer][pDeaths],GetPlayerMoney(idplayer),GetPlayerHealth,GetPlayerArmour,GetPlayerIp);
SendClientMessage(playerid, COLOR_GREEN, string);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_RED, "Player Not Connected.");
return 1;
}
}
pawn Code:
format(string, sizeof(string), "%s's Stats: Kills: %d | Deaths: %d | Ratio: %0.2f | Money: $%d | Health: | Armour: | IP: ",playername,pInfo[idplayer][pKills],pInfo[idplayer][pDeaths],Float:pInfo[idplayer][pKills]/Float:pInfo[idplayer][pDeaths],GetPlayerMoney(idplayer),GetPlayerHealth,GetPlayerArmour,GetPlayerIp);