Jump to content
  • 0

Erori


Shad0wdpbgd

Question

Salut, am aceste probleme.

C:\Wing RPG\gamemodes\Wing.pwn(3208) : error 028: invalid subscript (not an array or too many subscripts): "inputtext"
C:\Wing RPG\gamemodes\Wing.pwn(3208) : warning 215: expression has no effect
C:\Wing RPG\gamemodes\Wing.pwn(3208) : error 001: expected token: ";", but found "]"
C:\Wing RPG\gamemodes\Wing.pwn(3208) : error 029: invalid expression, assumed zero
C:\Wing RPG\gamemodes\Wing.pwn(3208) : fatal error 107: too many error messages on one line

if(isnull(inputtext)) return Dialog_Show(playerid, DIALOG_REPORT_CHEATER, DIALOG_STYLE_INPUT, "Report type: Cheater", "Scrie mai jos numele sau id-ul jucatorului care foloseste cheats:", "Select", "Close");

+

C:\Wing RPG\gamemodes\Wing.pwn(3211) : error 035: argument type mismatch (argument 1)

if(sscanf(inputtext, "u", userid)) return Dialog_Show(playerid, DIALOG_REPORT_CHEATER, DIALOG_STYLE_INPUT, "Report type: Cheater", "Scrie mai jos numele sau id-ul jucatorului care foloseste cheats:", "Select", "Close");

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0
Dialog:DIALOG_REPORT_CHEATER(playerid, response, listitem, inputtext[]) {
    if(!response)
        return true;

    if(Iter_Count(Reports) >= MAX_REPORTS) return SCM(playerid, COLOR_LGREEN, "There are too many reports in queue. Please wait...");
    if(Iter_Contains(ServerAdmins, playerid)) return SCM(playerid, COLOR_WHITE, "YOu are an admin, you can't use this command.");
    if(!Iter_Count(ServerAdmins)) return SCM(playerid, COLOR_GREY, "There are no admins connected.");
    if(PlayerInfo[playerid][pReportMute] > gettime()) return SCMF(playerid, COLOR_LGREEN, "You need to wait %d seconds before using this command again.", (PlayerInfo[playerid][pReportMute] - gettime()));

    if(isnull(inputtext)) return Dialog_Show(playerid, DIALOG_REPORT_CHEATER, DIALOG_STYLE_INPUT, "Report type: Cheater", "Scrie mai jos numele sau id-ul jucatorului care foloseste cheats:", "Select", "Close");

    new userid = INVALID_PLAYER_ID;
    if(!IsPlayerLogged(userid)) 
        return Dialog_Show(playerid, DIALOG_REPORT_CHEATER, DIALOG_STYLE_INPUT, "Report type: Cheater", "Scrie mai jos numele sau id-ul jucatorului care foloseste cheats:\n{AFAFAF}* Jucatorul nu este conectat.", "Select", "Close");

    if(userid == playerid) 
        return Dialog_Show(playerid, DIALOG_REPORT_CHEATER, DIALOG_STYLE_INPUT, "Report type: Cheater", "Scrie mai jos numele sau id-ul jucatorului care foloseste cheats:\n{AFAFAF}* Nu poti sa iti dai singur report.", "Select", "Close");

    if(Iter_Contains(ServerAdmins, userid)) 
        return Dialog_Show(playerid, DIALOG_REPORT_CHEATER, DIALOG_STYLE_INPUT, "Report type: Cheater", "Scrie mai jos numele sau id-ul jucatorului care foloseste cheats:\n{AFAFAF}* Nu poti sa raportezi un admin.", "Select", "Close");

    new id = (Iter_Count(Reports) + 1);

    ReportInfo[id][reportID] = playerid;
    ReportInfo[id][reportPlayer] = userid;
    ReportInfo[id][reportType] = REPORT_TYPE_CHEATER;
    ReportInfo[id][reportTimer] = defer ExpirationReport(id);
    format(ReportInfo[id][reportText], 128, "%s is maybe using cheats.", GetName(userid));
    Iter_Add(Reports, id);

    SCM(playerid, COLOR_YELLOW, "Jucatorul a fost raportat cu succes catre admini! Daca se suspecteaza ca foloseste cheats, o sa fie sanctionat in cel mai scurt timp posibil!");
    SendAdmin(COLOR_DARKNICERED, "Report by %s (ID: %d, Level: %d): %s", GetName(playerid), playerid, PlayerInfo[playerid][pLevel], ReportInfo[id][reportText]);
    PlayerInfo[playerid][pReportMute] = (gettime() + 120);  

    return true;
}

Ai uitat să pui cele două paranteze pătrate in header-ul „Dialog:”.

 

P.S.: Data viitoare pune codul in code-block, te rog.

  • Upvote 1
Link to comment
Share on other sites

  • 0
if(sscanf(params, "u", userid)) return Dialog_Show(playerid, DIALOG_REPORT_CHEATER, DIALOG_STYLE_INPUT, "Report type: Cheater", "Scrie mai jos numele sau id-ul jucatorului care foloseste cheats:", "Select", "Close");

 

Link to comment
Share on other sites

  • 0

Dialog:DIALOG_REPORT_CHEATER(playerid, response, listitem, inputtext)
{
    if(!response) return true;

    if(Iter_Count(Reports) >= MAX_REPORTS) return SCM(playerid, COLOR_LGREEN, "There are too many reports in queue. Please wait!");

    if(Iter_Contains(ServerAdmins, playerid)) return SCM(playerid, COLOR_WHITE, "You are admin! You can't use this command.");

    if(!Iter_Count(ServerAdmins)) return SCM(playerid, COLOR_GREY, "There are no admins connected.");

    if(PlayerInfo[playerid][pReportMute] > gettime()) return SCMF(playerid, COLOR_LGREEN, "You need to wait %d seconds before using this command again.", (PlayerInfo[playerid][pReportMute] - gettime()));

    //if(isnull(inputtext)) return Dialog_Show(playerid, DIALOG_REPORT_CHEATER, DIALOG_STYLE_INPUT, "Report type: Cheater", "Scrie mai jos numele sau id-ul jucatorului care foloseste cheats:", "Select", "Close");
    
    new userid = INVALID_PLAYER_ID;
    //if(sscanf(params, "u", userid)) return Dialog_Show(playerid, DIALOG_REPORT_CHEATER, DIALOG_STYLE_INPUT, "Report type: Cheater", "Scrie mai jos numele sau id-ul jucatorului care foloseste cheats:", "Select", "Close");

    if(!IsPlayerLogged(userid)) return Dialog_Show(playerid, DIALOG_REPORT_CHEATER, DIALOG_STYLE_INPUT, "Report type: Cheater", "Scrie mai jos numele sau id-ul jucatorului care foloseste cheats:\n{AFAFAF}* Jucatorul nu este conectat.", "Select", "Close");

    if(userid == playerid) return Dialog_Show(playerid, DIALOG_REPORT_CHEATER, DIALOG_STYLE_INPUT, "Report type: Cheater", "Scrie mai jos numele sau id-ul jucatorului care foloseste cheats:\n{AFAFAF}* Nu poti sa iti dai singur report.", "Select", "Close");

    if(Iter_Contains(ServerAdmins, userid)) return Dialog_Show(playerid, DIALOG_REPORT_CHEATER, DIALOG_STYLE_INPUT, "Report type: Cheater", "Scrie mai jos numele sau id-ul jucatorului care foloseste cheats:\n{AFAFAF}* Nu poti sa raportezi un admin.", "Select", "Close");

    new id = (Iter_Count(Reports) + 1);
    
    ReportInfo[id][reportID] = playerid;
    ReportInfo[id][reportPlayer] = userid;
    ReportInfo[id][reportType] = REPORT_TYPE_CHEATER;
    ReportInfo[id][reportTimer] = defer ExpirationReport(id);
    format(ReportInfo[id][reportText], 128, "%s is maybe using cheats.", GetName(userid));
    Iter_Add(Reports, id);

    SCM(playerid, COLOR_YELLOW, "Jucatorul a fost raportat cu succes catre admini! Daca se suspecteaza ca foloseste cheats, o sa fie sanctionat in cel mai scurt timp posibil!");
    SendAdmin(COLOR_DARKNICERED, "Report by %s (ID: %d, Level: %d): %s", GetName(playerid), playerid, PlayerInfo[playerid][pLevel], ReportInfo[id][reportText]);
    PlayerInfo[playerid][pReportMute] = (gettime() + 120);        
    return true;
}

 

liniile cu // sunt cu erori

Link to comment
Share on other sites

  • 0
On 3/17/2021 at 11:12 PM, Raduq said:

error 017: undefined symbol "params"

if(sscanf(inputtext, "u", userid)) return Dialog_Show(playerid, DIALOG_REPORT_CHEATER, DIALOG_STYLE_INPUT, "Report type: Cheater", "Scrie mai jos numele sau id-ul jucatorului care foloseste cheats:", "Select", "Close");
Edited by Ghost.

spacer.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.