/stats help
#5

Quote:
Originally Posted by [uL]Pottus
Посмотреть сообщение
You wrote legit code it will compile but it doesn't do what your expecting. I could write it but then you wouldn't learn anything at least give it a shot and if you have problems post your code and I'll tell you what you did wrong.

One quick thing...

pawn Код:
format(Jstring, sizeof(Jstring), "{ffd700}%s (ID:%d)\n\n \
        Score: %d\n \
        Money: $%d\n"
,
Basically means

pawn Код:
format(Jstring, sizeof(Jstring), "{ffd700}%s (ID:%d)\n\nScore: %d\nMoney: $%d\n",
The " \ " alone means the next line continues the line your on it's simply a way to organize your code.
I tried to make stcrat but it show warnings...

Код:
        new seconds = gettime() - pInfo[playerid][ConnectedTime] + pInfo[playerid][TotalSecs];
  		new str1[512];
		strcat(str1, "{ffd700}%s (ID:%d)\n\n",  pName, playerid); <<-----error 035: argument type mismatch (argument 3)
		strcat(str1, "%sScore: %d\n", GetPlayerScore(playerid));
		strcat(str1, "%sMoney: $%d\n", GetPlayerMoney(playerid));
		strcat(str1, "%sKills: %d\n", pInfo[playerid][Kills]);
		strcat(str1, "%sDeaths: %d\n", pInfo[playerid][Deaths]);
		strcat(str1, "%sRatio: %0.2f\n", Float:pInfo[playerid][Kills]/Float:pInfo[playerid][Deaths]); <<------warning 213: tag mismatch
  		strcat(str1, "%sTotal Time Logged in: %s\n", ConvertTime(seconds,m,h,d)); <<------error 035: argument type mismatch (argument 3)
        return ShowPlayerDialog(playerid,DIALOG_STATS,DIALOG_STYLE_MSGBOX,"Player Stats",Jstring,"Close","");
    }
Edit: Do you think if I made it right. It will show the whole format of stats? or it will show time logged in again?
Reply


Messages In This Thread
/stats help - by kbalor - 30.09.2013, 18:17
Re: /stats help - by Pottus - 30.09.2013, 18:25
Re: /stats help - by kbalor - 30.09.2013, 18:36
Re: /stats help - by Pottus - 30.09.2013, 18:44
Re: /stats help - by kbalor - 30.09.2013, 18:50
Re: /stats help - by Pottus - 30.09.2013, 18:52
Re: /stats help - by kbalor - 30.09.2013, 18:59
Re: /stats help - by kbalor - 30.09.2013, 20:41
Re: /stats help - by Dragonsaurus - 30.09.2013, 21:10
Re: /stats help - by kbalor - 30.09.2013, 21:15

Forum Jump:


Users browsing this thread: 1 Guest(s)