06.04.2018, 12:20
Error
Called function
Function
PHP код:
warning 202: number of arguments does not match definition
PHP код:
new target, text[500];
if (sscanf(params, "us[200]", target, text))
{
if(!IsPlayerConnected(target)) return SendClientMessage(playerid, -1, "No connected");
createReport(NoReports,text,returnNameEx(playerid),returnNameEx(target)); //error
SendClientMessage(playerid,-1,"Report has been send to online admins");
}
else
{
SendClientMessage(playerid, -1, "/report ID reason");
return 1;
}
PHP код:
forward createReport(r_Id,r_Text[],r_Name[MAX_PLAYER_NAME+1],r_For[MAX_PLAYER_NAME+1]);
public createReport(r_Id,r_Text[],r_Name[MAX_PLAYER_NAME+1],r_For[MAX_PLAYER_NAME+1])
{
new Hour, Minute,Second, Year, Month, Day;
getdate(Year, Month, Day);
gettime(Hour, Minute, Second);
ReportInfo[r_Id][rDate][0] = Year;
ReportInfo[r_Id][rDate][1] = Month;
ReportInfo[r_Id][rDate][2] = Day;
ReportInfo[r_Id][rTime][0] = Minute;
ReportInfo[r_Id][rTime][1] = Hour;
ReportInfo[r_Id][rStatus] = 1;
ReportInfo[r_Id][rId] = r_Id;
format(ReportInfo[r_Id][rText],200,r_Text);
format(ReportInfo[r_Id][rName],MAX_PLAYER_NAME+1,r_Name);
format(ReportInfo[r_Id][rFor],MAX_PLAYER_NAME+1,r_For);
NoReports++;
if(NoReports == 10)
{
NoReports = 0;
}
return 1;
}