05.01.2018, 19:12
I have a very strange bug with showing reports. it actually doesn't show the first letter.
See the image. and instead of showing thre reportedby name, it shows the reported player name.
ReportedName=Magic
ReportedBy=Tarvo
ReportedReason=testreport 1
ReportID=1
what is causing this?
code:
See the image. and instead of showing thre reportedby name, it shows the reported player name.
ReportedName=Magic
ReportedBy=Tarvo
ReportedReason=testreport 1
ReportID=1
what is causing this?
code:
PHP код:
CMD:pendingreports(playerid,params[])
{
if(AdminLevel[playerid] >=2)
{
new str[1024], string2[1024], string[1024], file[25];
for(new i = 1; i < MAX_REPORTS; i++)
{
format(file, sizeof(file), "Data/Reports/r%d.ini", i);
format(ReportInfo[i][ReportedBy], 256, "%s", dini_Get(file, "ReportedBy"));
format(ReportInfo[i][ReportedReason], 256, "%s", dini_Get(file, "ReportedReason"));
format(ReportInfo[i][ReportedName], 256, "%s", dini_Get(file, "ReportedName"));
ReportInfo[i][ReportID]=INI_Int(file,"ReportID");
if(ReportInfo[i][ReportID] == 0) break;
format(str,sizeof(str),"%s\t%s\t%s\t%d\n",ReportInfo[i][ReportedName],ReportInfo[i][ReportedBy],dini_Get(file, "ReportedReason"),ReportInfo[i][ReportID]);
strcat(string2,str);
}
format(str,sizeof(str),"Reported\tReported By\tReason\tReport ID\n%s", string2);
strcat(string,str);
ShowPlayerDialog(playerid, DIALOG_NONE, DIALOG_STYLE_TABLIST_HEADERS, "Pending Reports", string, "Ok", "");
}
return 1;
}