Code stops at certain point
#1

pawn Код:
if(strcmp(cmdtext, "/dgate", true) == 0)
    {
        tmp = strtok(cmdtext, idx);
        if(!IsPlayerInRangeOfPoint(playerid, 5.0, 263.70001220703, -1333, 55.700000762939)) return SendClientMessage(playerid, COLOR_GREY, "* You are not at Dills gate!");
        new gatepass[256], string2[256];
        format(string2, sizeof(string2), "Dill_Bellum.ini");
        if(!fexist(string2)) return SendClientMessage(playerid, COLOR_GREY, "* Cannot find Dill Bellum's userfile!");
        gatepass = dini_Get(string2, "pGatePassword");
        print("Stage 1");
        if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GREY, "* Dills gate requires a password !");
        if(!strcmp(gatepass, tmp))
        {
            print("Correct pass");
            if(dillsgate == 0)
            {
                MoveObject(dillsgateobj, 263.70001220703, -1333, 55.700000762939, 1.5);
                GameTextForPlayer(playerid, "~g~Opening ~w~Dills gate...", 2500, 3);
                dillsgate = 1;
                return 1;
            }
            if(dillsgate == 1)
            {
                MoveObject(dillsgateobj, 263.70001220703, -1333, 48.700000762939, 1.5);
                GameTextForPlayer(playerid, "~r~Closing ~w~Dills gate...", 2500, 3);
                dillsgate = 0;
                return 1;
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_LIGHTRED, "* Dills gate: Incorrect password !");
            print("Incorrect pass");
            return 1;
        }
        return 1;
    }
It stops at:
pawn Код:
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GREY, "* Dills gate requires a password !");
Reply


Messages In This Thread
Code stops at certain point - by Jack_Leslie - 05.10.2011, 12:47
Re: Code stops at certain point - by Pharrel - 05.10.2011, 12:53
Re: Code stops at certain point - by Jack_Leslie - 05.10.2011, 13:00

Forum Jump:


Users browsing this thread: 1 Guest(s)