stats command
#8

2 errors GOD DAMN


Код:
C:\Users\Lietotajs\Desktop\Fire~SATDM.pwn(32339) : warning 213: tag mismatch
C:\Users\Lietotajs\Desktop\Fire~SATDM.pwn(32344) : error 029: invalid expression, assumed zero
C:\Users\Lietotajs\Desktop\Fire~SATDM.pwn(32344) : warning 215: expression has no effect
C:\Users\Lietotajs\Desktop\Fire~SATDM.pwn(32344) : error 001: expected token: ";", but found "return"
C:\Users\Lietotajs\Desktop\Fire~SATDM.pwn(32345) : warning 225: unreachable code
C:\Users\Lietotajs\Desktop\Fire~SATDM.pwn(32329) : warning 204: symbol is assigned a value that is never used: "string"
C:\Users\Lietotajs\Desktop\Fire~SATDM.pwn(32329 -- 32347) : warning 209: function "cmd_stats" should return a value
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
and hoow the new code looks like

Код:
#if defined USE_STATS
CMD:stats(playerid,params[]) {
	new string[128], pDeaths, player1, h, m, s;
	if(isnull(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];
        new playerName[MAX_PLAYER_NAME],
        dialogTitle[MAX_PLAYER_NAME+24],
        dialogString[128],
        killDeathRatio = Float:PlayerInfo[player1][Kills]/Float:pDeaths;
        GetPlayerName(player1, playerName, sizeof(playerName));
        format(dialogTitle, sizeof(dialogTitle), "Stats of %s", playerName);
        format(dialogString, sizeof(dialogString), "Level: %d \nKills: %d \nDeaths: %d \nRatio: %0.2f \nMoney: $%d \nBank: $%d \nTime: %d hrs %d mins %d secs", PlayerInfo[player1][Level], PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths], Float:killDeathRatio, GetPlayerMoney(player1), PlayerInfo[player1][bank], h, m, s);
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, dialogTitle, dialogString, "Ok", "");
        else return SendClientMessage(playerid, red, "Player Not Connected!");
		return 1;
      }
}
#endif
Reply


Messages In This Thread
stats command - by RuNBoY - 30.06.2015, 18:53
Re: stats command - by RuNBoY - 30.06.2015, 19:09
Re: stats command - by Suicidal.Banana - 30.06.2015, 19:24
Re: stats command - by RuNBoY - 30.06.2015, 19:29
Re: stats command - by RuNBoY - 30.06.2015, 19:39
Re : stats command - by Terrorizt - 30.06.2015, 19:41
Re: stats command - by Suicidal.Banana - 30.06.2015, 19:46
Re: stats command - by RuNBoY - 30.06.2015, 19:57
Re : stats command - by Terrorizt - 30.06.2015, 20:05
Re: stats command - by Suicidal.Banana - 30.06.2015, 20:08

Forum Jump:


Users browsing this thread: 1 Guest(s)