This error .. :S
#1

Hi ,

I have a problem with my gamemode , it says that theres an error at line 166139 but my gamemode stop at 116138 ..

I don't know how to fix this ..

Thanks for the help.
Reply
#2

This is a really weird error, BUT tell us what the error is, so we can get at least an idea of how to help you fix it. WHAT is the error saying?
Reply
#3

This Means u havent used a defined variable Give us the Error which u get
Reply
#4

Quote:

warning 203: symbol is never used: "Captcha"
warning 203: symbol is never used: "TextArray"

There you go.
Reply
#5

find this


TextArray
Captcha

If You Get it in this format

pawn Код:
new TextArray;
new Captcha;
just comment that line by doing this

pawn Код:
//new TextArray;
//new Captcha;
Reply
#6

Everything seems ok for me but , I can't find it :

Here is the code :

pawn Код:
/*stock CreateSecurityTextDraw(playerid)
{
    if(CheckingBot{playerid})
    {
        for(new i = 0, cindex = 0; i < sizeof(Captcha); i++)
        {
            if(i == 0) Captcha[i] = CreatePlayerTextDraw(playerid, 269.0, 139.0, "Anti-bot captcha:");
            if(i == 1)
            {
                new cstring[24];
                format(cstring, sizeof(cstring), "%c%c%c%c%c", TextArray[random(sizeof(TextArray))], TextArray[random(sizeof(TextArray))], TextArray[random(sizeof(TextArray))], TextArray[random(sizeof(TextArray))], TextArray[random(sizeof(TextArray))]);
                Captcha[i] = CreatePlayerTextDraw(playerid, 422.0, 139.0, cstring);
                SetPVarString(playerid, "CaptchaCode", cstring);
            }
            if(i == 2) Captcha[i] = CreatePlayerTextDraw(playerid, 285.0, 174.0, "Please repeat:");
            if(i == 3) Captcha[i] = CreatePlayerTextDraw(playerid, 427.0, 178.0, "-----");
            if(i > 3)
            {
                new string[4];
                format(string, sizeof(string), "%c", TextArray[i - 4]);
                if(i >= 4) Captcha[i] = CreatePlayerTextDraw(playerid, 158.0 + (41.0 * cindex), 218.0, string);
                if(i == 14) cindex = 0, Captcha[i] = CreatePlayerTextDraw(playerid, 158.0 + (41.0 * cindex), 259.0, string);
                if(i > 14) Captcha[i] = CreatePlayerTextDraw(playerid, 158.0 + (41.0 * cindex), 259.0, string);
                if(i == 24) cindex = 0, Captcha[i] = CreatePlayerTextDraw(playerid, 178.0 + (41.0 * cindex), 300.0, string);
                if(i > 24) Captcha[i] = CreatePlayerTextDraw(playerid, 178.0 + (41.0 * cindex), 300.0, string);
                if(i == 33) cindex = 0, Captcha[i] = CreatePlayerTextDraw(playerid, 220.0 + (41.0 * cindex), 341.0, string);
                if(i > 33) Captcha[i] = CreatePlayerTextDraw(playerid, 220.0 + (41.0 * cindex), 341.0, string);
                PlayerTextDrawUseBox(playerid, Captcha[i], 1);
                PlayerTextDrawBoxColor(playerid, Captcha[i], 0x000000AA);
                PlayerTextDrawTextSize(playerid, Captcha[i], 29.0, 29.0);
                PlayerTextDrawSetSelectable(playerid, Captcha[i], 1);
                cindex++;
            }
            PlayerTextDrawLetterSize(playerid, Captcha[i], 0.63, 3.4);
            PlayerTextDrawAlignment(playerid, Captcha[i], 2);
            PlayerTextDrawSetOutline(playerid, Captcha[i], 1);
            PlayerTextDrawShow(playerid, Captcha[i]);
            SelectTextDraw(playerid, 0xFDE39DFF);
        }
    }
}

public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
    //new str[500];
    if(CheckingBot{playerid})
    {
        for(new i = 4; i < sizeof(Captcha); i++)
        {
            if(playertextid == Captcha[i])
            {
                new step = GetIntVar(playerid, "CaptchaStep"), sstring[96];
                GetPVarString(playerid, "CaptchaText", sstring, sizeof(sstring));
                switch(step)
                {
                    case 0: format(sstring, sizeof(sstring), "%c", TextArray[i - 4]), strcat(sstring, "----"), SetPVarString(playerid, "CaptchaText", sstring);
                    case 1: format(sstring, sizeof(sstring), "%s%c", sstring, TextArray[i - 4]), strdel(sstring, 1, 5), strcat(sstring, "---"), SetPVarString(playerid, "CaptchaText", sstring);
                    case 2: format(sstring, sizeof(sstring), "%s%c", sstring, TextArray[i - 4]), strdel(sstring, 2, 5), strcat(sstring, "--"), SetPVarString(playerid, "CaptchaText", sstring);
                    case 3: format(sstring, sizeof(sstring), "%s%c", sstring, TextArray[i - 4]), strdel(sstring, 3, 5), strcat(sstring, "-"), SetPVarString(playerid, "CaptchaText", sstring);
                    case 4:
                    {
                        strdel(sstring, 4, 5);
                        format(sstring, sizeof(sstring), "%s%c", sstring, TextArray[i - 4]);
                        PlayerTextDrawSetString(playerid, Captcha[3], sstring);
                        new cstring[24];
                        GetPVarString(playerid, "CaptchaCode", cstring, sizeof(cstring));
                        if(strcmp(cstring, sstring) != 0)
                        {
                            format(cstring, sizeof(cstring), "%c%c%c%c%c", TextArray[random(sizeof(TextArray) - 1)], TextArray[random(sizeof(TextArray) - 1)], TextArray[random(sizeof(TextArray) - 1)], TextArray[random(sizeof(TextArray) - 1)], TextArray[random(sizeof(TextArray) - 1)]);
                            PlayerTextDrawSetString(playerid, Captcha[1], cstring);
                            SetStringVar(playerid, "CaptchaCode", cstring);
                            PlayerTextDrawSetString(playerid, Captcha[3], "-----");
                            //If they we're wrong
                            SendClientMessage(playerid, 0xFF0000FF, "You have entered a wrong captcha || Please re-try inorder to proceed to the registeration/login panel.");
                            //If they we're wrong
                            RemoveVar(playerid, "CaptchaStep");
                            RemoveVar(playerid, "CaptchaText");
                            return 1;
                        }
                        else
                        {
                            for(new l = 0; l < sizeof(Captcha); l++) PlayerTextDrawHide(playerid, Captcha[l]);
                            RemoveVar(playerid, "CaptchaStep");
                            RemoveVar(playerid, "CaptchaCode");
                            RemoveVar(playerid, "CaptchaText");
                            SetIntVar(playerid, "CaptchaPass", 1);
                            CancelSelectTextDraw(playerid);
                            CheckingBot{playerid} = false;
                            SendClientMessage(playerid, COLOR_WHITE, "");
                            SendClientMessage(playerid, COLOR_WHITE, "");
                            SendClientMessage(playerid, COLOR_WHITE, "Welcome to United RP || You have sucessfully passed through the Anti-Bot detection.");
                            SetIntVar(playerid, "RegisterPart", 1);
                            if(gPlayerLogged[playerid] == 0)
                            {
                                switch(gPlayerAccount[playerid])
                                {
                                    case 0: DisplayDialogForPlayer(playerid, 2); //register
                                    case 1: DisplayDialogForPlayer(playerid, 1); //login
                                }
                            }
                            ShowArea(playerid);
                            ShowGUI(playerid);
                            TextDrawShowForPlayer(playerid, Website);
                            FadeColorForPlayer(playerid,0,0,0,255,0,0,0,0,15,0);
                            SetupPlayerForClassSelection(playerid);
                            return 1;
                        }
                    }
                }
                SetIntVar(playerid, "CaptchaStep", step + 1);
                PlayerTextDrawSetString(playerid, Captcha[3], sstring);
            }
        }
    }
    return 1;
}*/
Reply
#7

I'm not a scientist but those dont look like 116138 lines.
Reply
#8

Nevermind , I found it :

pawn Код:
//new PlayerText:Captcha[40], TextArray[] = "POIUYTREWQWLKJHGFDSAMNBVCXZ123456789";
Thanks Darklord
Reply
#9

Uncomment those lines by removing that " /* " from starting and "*/" from ending

Edit : upps u found it xD i didnt see ur comment anyways if u wanna remove it do it else its on u to manipulate the script
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)