Trash Report Error
#1

Hey, I tried to add here that on somone /tr its adding a reason to the player and to the admin chat and I have error:

Errors:
Код:
./includes/Script.pwn(40982) : error 001: expected token: ";", but found ")"
./includes/Script.pwn(40982) : error 029: invalid expression, assumed zero
Code:
Код:
CMD:tr(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 2)
    {
        new string[128], reportid, reason[26];
        if(sscanf(params, "ds[26]", reportid,reason)) return SendClientMessageEx(playerid, COLOR_WHITE,"USAGE: /tr [reportid] [reason]");

        if(reportid < 0 || reportid > 999) { SendClientMessageEx(playerid, COLOR_GREY, "   Report ID not below 0 or above 999!"); return 1; }
        if(Reports[reportid][BeingUsed] == 0)
        {
            SendClientMessageEx(playerid, COLOR_GREY, "   That report ID is not being used!");
            return 1;
        }
        if(!IsPlayerConnected(Reports[reportid][ReportFrom]))
        {
            SendClientMessageEx(playerid, COLOR_GREY, "   The reporter has disconnected !");
            Reports[reportid][ReportFrom] = INVALID_PLAYER_ID;
            Reports[reportid][BeingUsed] = 0;
            return 1;
        }
        if(GetPVarInt(Reports[reportid][ReportFrom], "RequestingAdP") == 1)
        {
            return SendClientMessageEx(playerid, COLOR_GRAD1, "You cannot trash/post this advertisement, you must accept it with /ar.");
        }
        format(string, sizeof(string), "AdmCmd: %s has trashed the report from %s. {FF0000}Reason: %s", GetPlayerNameEx(playerid), GetPlayerNameEx(Reports[reportid][ReportFrom],reason));
        ABroadCast(COLOR_ORANGE, string, 2);
        format(string, sizeof(string), "%s has marked your report invalid use /reporttips. {FF0000}Reason: %s", GetPlayerNameEx(playerid),reason));
        SendClientMessageEx(Reports[reportid][ReportFrom], COLOR_WHITE, string);
        PlayerInfo[playerid][pTrashReport]++;
        DeletePVar(Reports[reportid][ReportFrom], "HasReport");
        DeletePVar(Reports[reportid][ReportFrom], "_rAutoM");
        DeletePVar(Reports[reportid][ReportFrom], "_rRepID");       Reports[reportid][ReportFrom] = INVALID_PLAYER_ID;
        Reports[reportid][BeingUsed] = 0;
        Reports[reportid][TimeToExpire] = 0;
        strmid(Reports[reportid][Report], "None", 0, 4, 4);
    }
    return 1;
}
Line has the errors:
Код:
        format(string, sizeof(string), "%s has marked your report invalid use /reporttips. {FF0000}Reason: %s", GetPlayerNameEx(playerid),reason));
Reply
#2

use this
pawn Код:
format(string, sizeof(string), "%s has marked your report invalid use /reporttips. {FF0000}Reason: %s", GetPlayerNameEx(playerid),reason);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)