30.12.2010, 19:49
Hey i created a /stats
put i got erreors
How i can fix that ?
pawn Код:
#if defined USE_STATS
dcmd_stats(playerid,params[]) {
new string[256], string2[256], string3[256], string4[256], string5[256], string6[256], string7[256], pDeaths, player1, h, m, s;
if(!strlen(params)) player1 = playerid;
else player1 = strval(params);
if(IsPlayerConnected(player1)) {
TotalGameTime(player1, h, m, s);
if(PlayerInfo[player1][Deaths] == 0) pDeaths = 1; else pDeaths = PlayerInfo[player1][Deaths];
format string, sizeof(string), "> Username: %s", PlayerName2(player1));
format string2, sizeof(string2), "> Kills: %d", PlayerInfo[player1][Kills]);
format string3, sizeof(string3), "> Deaths: %d", PlayerInfo[player1][Deaths]);
format string4, sizeof(string4), "> Ratio: %0.2f", Float:PlayerInfo[player1][Kills]/Float:pDeaths);
format string5, sizeof(string5), "> Money: %d", GetPlayerMoney(player1));
format string6, sizeof(string6), "> Score: %d", GetPlayerScore(player1));
foramt string7, sizeof(string7), "> Time: %d hours %d minutes %d seconds", h, m, s);
return SendClientMessage(playerid, green, string);
return SendClientMessage(playerid, green, string2);
return SendClientMessage(playerid, green, string3);
return SendClientMessage(playerid, green, string4);
return SendClientMessage(playerid, green, string5);
return SendClientMessage(playerid, green, string6);
return SendClientMessage(playerid, green, string7);
} else return SendClientMessage(playerid, red, "Player Not Connected!");
}
#endif
pawn Код:
C:\Users\Kodu\Desktop\Unity Stuntages 0.3c\filterscripts\ladmin4v2.pwn(4399) : error 076: syntax error in the expression, or invalid function call
C:\Users\Kodu\Desktop\Unity Stuntages 0.3c\filterscripts\ladmin4v2.pwn(4399) : warning 215: expression has no effect
C:\Users\Kodu\Desktop\Unity Stuntages 0.3c\filterscripts\ladmin4v2.pwn(4399) : warning 215: expression has no effect
C:\Users\Kodu\Desktop\Unity Stuntages 0.3c\filterscripts\ladmin4v2.pwn(4399) : warning 215: expression has no effect
C:\Users\Kodu\Desktop\Unity Stuntages 0.3c\filterscripts\ladmin4v2.pwn(4399) : error 001: expected token: ";", but found ")"
C:\Users\Kodu\Desktop\Unity Stuntages 0.3c\filterscripts\ladmin4v2.pwn(4399) : error 029: invalid expression, assumed zero
C:\Users\Kodu\Desktop\Unity Stuntages 0.3c\filterscripts\ladmin4v2.pwn(4399) : 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.