need help with this
#1

Code:
CMD:reports(playerid)
{
	if (adlvl[playerid] < 1) return 0;
	static info[150 * (MAX_REPORTS+1)];
	info[0] = EOS;
	for (new i; i < MAX_REPORTS; i++)
	{
	    if (g_Report[i][E_REPORT_VALID])
	    {
		    if (g_ReportChecked[playerid][i])
				format(info, sizeof (info), "%s("COLOR_GREEN"Read"COLOR_WHITE") %s reported against %s | %s\n", info, g_Report[i][E_REPORT_AGAINST_NAME], g_Report[i][E_REPORT_FROM_NAME], ReturnTimelapse(g_Report[i][E_REPORT_TIMESTAMP], gettime()));
			else
				format(info, sizeof (info), "%s("COLOR_ORANGE"Unread"COLOR_WHITE") %s reported against %s | %s\n", info, g_Report[i][E_REPORT_AGAINST_NAME], g_Report[i][E_REPORT_FROM_NAME], ReturnTimelapse(g_Report[i][E_REPORT_TIMESTAMP], gettime()));
	    }
	}

	if (!info[0])
        return SendClientMessage(playerid, COLOR_RED, "Error: No reports found in log.");

	Dialog_Show(playerid, DIALOG_REPORTS_LIST, DIALOG_STYLE_LIST, "Reports list", info, "Select", "Cancel");
	return 1;
}
how to fix this

Code:
BvG.pwn(19254) : error 001: expected token: "-string end-", but found "-identifier-"
BvG.pwn(19254) : warning 217: loose indentation
BvG.pwn(19254) : error 001: expected token: "-string end-", but found "-identifier-"
BvG.pwn(19254) : warning 215: expression has no effect
BvG.pwn(19254) : error 001: expected token: ";", but found "-integer value-"
BvG.pwn(19254) : fatal error 107: too many error messages on one line
Code:
format(info, sizeof (info), "%s("COLOR_GREEN"Read"COLOR_WHITE") %s reported against %s | %s\n", info, g_Report[i][E_REPORT_AGAINST_NAME], g_Report[i][E_REPORT_FROM_NAME], ReturnTimelapse(g_Report[i][E_REPORT_TIMESTAMP], gettime()));
this line
Reply
#2

1: In your script press CTRL+A to select all and then press SHIFT+TAB multiple times. This will fix loose identation

2:

Code:
CMD:reports(playerid)
{
if (adlvl[playerid] < 1) return 0;
static info[150 * (MAX_REPORTS+1)];
info[0] = EOS;
for (new i; i < MAX_REPORTS; i++)
{
if (g_Report[i][E_REPORT_VALID])
{
if (g_ReportChecked[playerid][i])
{
format(info, sizeof (info), "%s("COLOR_GREEN"Read"COLOR_WHITE") %s reported against %s | %s\n", info, g_Report[i][E_REPORT_AGAINST_NAME], g_Report[i][E_REPORT_FROM_NAME], ReturnTimelapse(g_Report[i][E_REPORT_TIMESTAMP], gettime()));
}
else
{
format(info, sizeof (info), "%s("COLOR_ORANGE"Unread"COLOR_WHITE") %s reported against %s | %s\n", info, g_Report[i][E_REPORT_AGAINST_NAME], g_Report[i][E_REPORT_FROM_NAME], ReturnTimelapse(g_Report[i][E_REPORT_TIMESTAMP], gettime()));
}
}
}

if (!info[0])
return SendClientMessage(playerid, COLOR_RED, "Error: No reports found in log.");

Dialog_Show(playerid, DIALOG_REPORTS_LIST, DIALOG_STYLE_LIST, "Reports list", info, "Select", "Cancel");
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)