/report sends out y with accent
#5

pawn Код:
CMD:report(playerid, params[])
{
    new reporttext[64];
    if(sscanf(params, "s[64]", reporttext)) return Syntax(playerid, "report", "[reporttext].");
    if(strlen(reporttext) > 64) return Error(playerid, "Your report text cannot be more than 64 characters");
    if(PlayerInfo[playerid][pRMuted]) return Error(playerid, "You are currently muted from the reports system. Report not sent.");
    if(GetPlayerActiveReport(playerid)) return Error(playerid, "You already have an active report. Please wait until it is closed out to re-report.");
    new reportid = GetNewReportID();
    if(reportid == INVALID_REPORT_ID) return Error(playerid, "There are currently too many reports in the system. Please try again in a few minutes.");
    new q[256];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, 24);
    new time = gettime();
    format(q, 256, "INSERT INTO reports (`reporter`, reporttext`, `time`, `accepted`, `resolved`, `rtime`) VALUES ('%s', '%s', %d, %d, %d, %d)", name, reporttext, time, 0, 0, 0);


    new string[128];
    format(STRING, "[RID: %d] Report from %s [%d] : %s", reportid, GetPlayerNameEx(playerid), playerid, reporttext);
    SendAdminMessage(COLOR_ADMIN, string);
    SendAdminText();
    print(string);
    format(STRING, "Your report has been sent to the admins. Please be paitient and wait until an admin can help you.");
    Message(playerid, string);


    Reports[reportid][rep_reporter] = playerid;
    Reports[reportid][rep_text] = reporttext;
    Reports[reportid][rep_time] = time;
    Reports[reportid][rep_accepted] = 0;

    return 1;
}
Your sscanf format was wrong.

You forgot to remove the ID parameter in your format

EDIT: Too late,
Reply


Messages In This Thread
/report sends out y with accent - by AchievementMaster360 - 03.12.2013, 23:49
Re: /report sends out y with accent - by Loot - 04.12.2013, 00:03
Re: /report sends out y with accent - by AchievementMaster360 - 04.12.2013, 00:36
Re: /report sends out y with accent - by Loot - 04.12.2013, 02:23
Respuesta: /report sends out y with accent - by [CG]Milito - 04.12.2013, 02:27
Re: /report sends out y with accent - by Tayab - 04.12.2013, 02:29

Forum Jump:


Users browsing this thread: 3 Guest(s)