#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
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.
format string, sizeof(string), "> Username: %s", PlayerName2(player1));
new string[128];
format(string, sizeof(string), "> Username: %s", PlayerName2(player1));
You have '(' missing.
pawn Код:
|
#if defined USE_STATS
dcmd_stats(playerid,params[]) {
new string[128], string2[128], string3[128], string4[128], string5[128], string6[128], string7[128], 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
C:\Users\Kodu\Desktop\Unity Stuntages 0.3c\filterscripts\ladmin4v2.pwn(4405) : error 017: undefined symbol "foramt"
C:\Users\Kodu\Desktop\Unity Stuntages 0.3c\filterscripts\ladmin4v2.pwn(4405) : warning 202: number of arguments does not match definition
C:\Users\Kodu\Desktop\Unity Stuntages 0.3c\filterscripts\ladmin4v2.pwn(4405) : warning 202: number of arguments does not match definition
C:\Users\Kodu\Desktop\Unity Stuntages 0.3c\filterscripts\ladmin4v2.pwn(4405) : warning 202: number of arguments does not match definition
C:\Users\Kodu\Desktop\Unity Stuntages 0.3c\filterscripts\ladmin4v2.pwn(4405) : warning 202: number of arguments does not match definition
C:\Users\Kodu\Desktop\Unity Stuntages 0.3c\filterscripts\ladmin4v2.pwn(4405) : warning 202: number of arguments does not match definition
C:\Users\Kodu\Desktop\Unity Stuntages 0.3c\filterscripts\ladmin4v2.pwn(4407) : warning 225: unreachable code
C:\Users\Kodu\Desktop\Unity Stuntages 0.3c\filterscripts\ladmin4v2.pwn(4408) : warning 225: unreachable code
C:\Users\Kodu\Desktop\Unity Stuntages 0.3c\filterscripts\ladmin4v2.pwn(4409) : warning 225: unreachable code
C:\Users\Kodu\Desktop\Unity Stuntages 0.3c\filterscripts\ladmin4v2.pwn(4410) : warning 225: unreachable code
C:\Users\Kodu\Desktop\Unity Stuntages 0.3c\filterscripts\ladmin4v2.pwn(4411) : warning 225: unreachable code
C:\Users\Kodu\Desktop\Unity Stuntages 0.3c\filterscripts\ladmin4v2.pwn(4412) : warning 225: unreachable code
C:\Users\Kodu\Desktop\Unity Stuntages 0.3c\filterscripts\ladmin4v2.pwn(7056) : error 001: expected token: "#endif", but found "-end of file-"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
foramt string7, sizeof(string7), "> Time: %d hours %d minutes %d seconds", h, m, s);
error 017: undefined symbol "foramt"
error 001: expected token: "#endif", but found "-end of file-"
#if defined USE_STATS
dcmd_stats(playerid,params[]) {
new string[128], string2[128], string3[128], string4[128], string5[128], string6[128], string7[128], 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
}
#if defined USE_STATS
dcmd_stats(playerid,params[])
{
new string[128], pDeaths, player1, h, m, s;
if(!strlen(params)) player1 = playerid;
else player1 = strval(params);
if(!IsPlayerConnected(player1)) return SendClientMessage(playerid, red, "Player Not Connected!");
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));
SendClientMessage(playerid, green, string);
format(string, sizeof(string), "> Kills: %d", PlayerInfo[player1][Kills]);
SendClientMessage(playerid, green, string2);
format(string, sizeof(string), "> Deaths: %d", PlayerInfo[player1][Deaths]);
SendClientMessage(playerid, green, string2);
format(string, sizeof(string), "> Ratio: %0.2f", Float:PlayerInfo[player1][Kills]/Float:pDeaths);
SendClientMessage(playerid, green, string2);
format(string, sizeof(string), "> Money: %d", GetPlayerMoney(player1));
SendClientMessage(playerid, green, string2);
format(string, sizeof(string), "> Score: %d", GetPlayerScore(player1));
SendClientMessage(playerid, green, string2);
format(string, sizeof(string), "> Time: %d hours %d minutes %d seconds", h, m, s);
SendClientMessage(playerid, green, string2);
}
#endif
You can just use one string on every message Much easier.
pawn Код:
|
C:\Users\Kodu\Desktop\Unity Stuntages 0.3c\filterscripts\ladmin4v2.pwn(4415) : warning 209: function "dcmd_stats" should return a value
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Warning.