26.02.2015, 10:18
Hello Everyone,
Today while scripting my Roleplay gamemode I got some errors :
Lines-
Errors in particular lines :
Please help me,
Thanks.
Today while scripting my Roleplay gamemode I got some errors :
Lines-
Код:
stock SendReportToQueue(ReportFrom, Report[]) { new bool:breakingloop = false, newid = INVALID_REPORT_ID; for(new i=0;i<MAX_REPORTS;i++) { if(!breakingloop) { if(Reports[i][HasBeenUsed] == 0) { breakingloop = true; newid = i; } } } if(newid != INVALID_REPORT_ID) { strmid(Reports[newid][Report], Report, 0, strlen(report), 140); Reports[newid][ReportFrom] = ReportFrom; Reports[newid][TimeToExpire] = 5; Reports[newid][HasBeenUsed] = 1; Reports[newid][BeingUsed] = 1; Reports[newid][ReportExpireTimer] = SetTimerEx("ReportTimer", 60000, 0, "d", newid); new string[140]; format(string, sizeof(string), "Report from [%i] %s (RID: %i): %s", ReportFrom, GetPlayerNameEx(ReportFrom), newid, (report)); ABroadCast(COLOR_REPORT,string,1); } else { ClearReports(); SendReportToQueue(ReportFrom, report); } }
Код:
LINE: strmid(Reports[newid][Report], Report, 0, strlen(report), 140); ERROR : error 035: argument type mismatch (argument 2) LINE : format(string, sizeof(string), "Report from [%i] %s (RID: %i): %s", ReportFrom, GetPlayerNameEx(ReportFrom), newid, (report)); ABroadCast(COLOR_REPORT,string,1); ERRORs : 1) error 012: invalid function call, not a valid address 2) error 001: expected token: ";", but found ")" 3) error 029: invalid expression, assumed zero
Thanks.