Jump to content

Recommended Posts

Posted

Salut, incerc de vro 2 ore sa ii dau de cap si nu reusesc la aceasta eroare:

[hide]C:\Users\siber\Desktop\F-Forever\gamemodes\f-forever.pwn(584) : error 040: duplicate "case" label (value 7)
Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
[Finished in 5.3s][/hide]

si asta este linia case DIALOG_REPORTTT unde este eroarea

[hide]

case DIALOG_REPORTTT:
        {
            if(!response) return true;
            SetPVarInt(playerid, "Selected", listitem);
            switch(listitem)
            {
                case 0: ShowPlayerDialog(playerid, DIALOG_REPORTTT+1, DIALOG_STYLE_INPUT, "Problema", "Scrie problema care o ai mai jos:", "oK", "Exit");
                case 1: ShowPlayerDialog(playerid, DIALOG_REPORTTT+1, DIALOG_STYLE_INPUT, "DM", "Scrie id-ul/numele playerului care face DM!", "oK", "Exit");
                case 2:    
                {
                    new string[144];
                    format(string, sizeof(string), "%s (%d): este blocat", GetName(playerid), playerid);
                    SendAdminMessage(COLOR_RED, string, 1);

                    if(ReportTime[playerid] != 0)
                    {
                        KillTimer(ReportTime[playerid]);
                        ReportTime[playerid] = 0;
                    }

                    ReportTime[playerid] = SetTimerEx("checkReporturi", 300000, 0, "%d", playerid);
                    SCM(playerid, COLOR_PRIMIRECEVA, "Reportul tau a fost trimis adminilor!");
                    P_Date[playerid][pTimeReport] = 180;

                    SetPVarInt(playerid, "Reported", 1);
                    SetPVarInt(playerid, "ReportType", 3);
                }
                case 3:    ShowPlayerDialog(playerid, DIALOG_REPORTTT+1, DIALOG_STYLE_INPUT, "Codat", "Scrie numele/id-ul playerului respectiv", "oK", "Exit");
                case 4: ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Donatii", "Pentru mai multe informatii luati legatura cu ownerul!", "oK", "Exit");
            }
        }
        case DIALOG_REPORTTT+1:
        {
            if(!response) return ShowPlayerDialog(playerid, DIALOG_REPORTTT, DIALOG_STYLE_LIST, "Report", "Problema\nRaporteaza DM\nSunt Blocat\nRaporteaza Codat\nIntrebari Donatii", "oK", "Exit");

            new type = GetPVarInt(playerid, "Selected"), targetid = strlen(inputtext), str[144];

            if(type != 1)
            {
                if(sscanf(inputtext, "u", targetid))
                {
                    ShowPlayerDialog(playerid, DIALOG_REPORTTT, DIALOG_STYLE_LIST, "Report", "Problema\nRaporteaza DM\nSunt Blocat\nRaporteaza Codat\nIntrebari Donatii", "oK", "Exit");
                    SCM(playerid, COLOR_ERROR, "ERROR: {FFFFFF}ID invalid");
                    return true;
                }
                if(targetid == playerid)
                {
                    ShowPlayerDialog(playerid, DIALOG_REPORTTT, DIALOG_STYLE_LIST, "Report", "Problema\nRaporteaza DM\nSunt Blocat\nRaporteaza Codat\nIntrebari Donatii", "oK", "Exit");
                    SCM(playerid, COLOR_ERROR, "ERROR: {FFFFFF}Nu te poti adauga pe tine");
                    return true;
                }
                if(!IsPlayerConnected(targetid))
                {
                    ShowPlayerDialog(playerid, DIALOG_REPORTTT, DIALOG_STYLE_LIST, "Report", "Problema\nRaporteaza DM\nSunt Blocat\nRaporteaza Codat\nIntrebari Donatii", "oK", "Exit");
                    SCM(playerid, COLOR_ERROR, "ERROR: {FFFFFF}Acel player nu este conectat");
                    return true;
                }
            }

            switch(type)
            {
                case 0:
                {
                    format(str, sizeof(str), "Report de la %s (%d): %s", GetName(playerid), playerid, inputtext);
                    SendAdminMessage(COLOR_RED, str, 1);
                    SetPVarInt(playerid, "Reported", 1);
                    SetPVarInt(playerid, "ReportType", 1);
                    SetPVarString(playerid, "ReportText", inputtext);
                }
                case 1:
                {
                    format(str, sizeof(str), "%s(%d) la raportat pe %s(%d) pentru DM.", GetName(playerid), playerid, GetName(targetid), targetid);
                    SendAdminMessage(COLOR_RED, str, 1);

                    SetPVarInt(targetid, "Reported", 1);
                    SetPVarInt(targetid, "ReportType", 2);
                    SetPVarString(targetid, "ReportedBy", GetName(playerid));
                    SetPVarInt(targetid, "ReportScore", GetPVarInt(targetid, "ReportScore")+1);

                }
                case 3:
                {
                    format(str, sizeof(str), "%s(%d) la raportat pe %s(%d) pentru cheats.", GetName(playerid), playerid, GetName(targetid), targetid);
                    SendAdminMessage(COLOR_RED, str, 1);

                    SetPVarInt(targetid, "Reported", 1);
                    SetPVarInt(targetid, "ReportType", 4);
                    SetPVarString(targetid, "ReportedBy", GetName(playerid));
                    SetPVarInt(targetid, "ReportScore", GetPVarInt(targetid, "ReportScore")+1);                    
                }
            }
            if(ReportTime[playerid] != 0)
            {
                KillTimer(ReportTime[playerid]);
                ReportTime[playerid] = 0;
            }

            P_Date[playerid][pTimeReport] = 180;
            AjutorPlayeri[playerid] = 1;
            ReportTime[playerid] = SetTimerEx("checkRaporturi", 300000, 0, "%d", playerid);
            SCM(playerid, COLOR_PRIMIRECEVA, "Reportul tau a fost trimis adminilor!");
        }[/hide]

iar enum de dialoguri

[hide]enum
{
    //Register
    DIALOG_REGISTER,
    DIALOG_EMAIL,
    DIALOG_SEX, 
    DIALOG_VARSTA,
    DIALOG_REFFERAL,
    //Login
    DIALOG_LOGIN,
    //Alte dialoguri
    DIALOG_REPORTTT,
    DIALOG_SERVER
};[/hide]

In momentul asta chiar nu pricep ce are, daca cineva are vro idee.

Multumesc anticipat.

Posted (edited)

Inlocuieste DIALOGREPORTTT+1 CU DIALOG_REPORTTT2 si pune si la enum dupa DIALOG_REPORTTT. Din cate stiu nu merge treaba cu +1 in enum.

Edited by BaFFyJunior
  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.