/command can not be implemented
#1

Hey guys, i made a simple Bank CMD to rob it, but i'm having some trouble with my script, i get this error when compiling:

Код:
C:\Users\Gilberto\Downloads\Alternative RP Test Server\filterscripts\ichrome1.pwn(244) : error 001: expected token: "#endif", but found "-end of file-"
These kind of errors i get on the last line of my script, wich is line 43 and it's empty, and 244 doesn't even exist, here's the code:

pawn Код:
CMD:robbank(playerid, params[])
{
        if(IsPlayerConnected(playerid))
        {
            if(robbing[playerid] == 1)
            {
                SendClientMessage(playerid, COLOR_GREY, " You are already robbing the bank, please slow down");
                return 1;
            }
            if(alreadyrobbed[playerid] == 1)
            {
                SendClientMessage(playerid, COLOR_WHITE, "You already robbed the bank! Wait 1 hour.");
                return 1;
               }
            if(!IsPlayerInRangeOfPoint(playerid, 5.0, 2308.8071,-13.2485,26.7422)) // Bank Coords
            {
                SendClientMessage(playerid, COLOR_GREY, "   You are not at the bank !");
                return 1;
            }
                    SendClientMessage(playerid, COLOR_WHITE, " You started to rob the bank, This will take 10 minutes, watch out for cops!");
                    SetTimerEx("bankrob", 600000, false, "i", playerid);
                    robbing[playerid] = 1;
                    SendClientMessageToAll(COLOR_CYAN, "____________Latest News____________");
                    SendClientMessageToAll(COLOR_BLUE, " The bank is currently getting robbed.");
                    SendClientMessageToAll(COLOR_BLUE, " We are currently waiting for the cops");
                    SendClientMessageToAll(COLOR_BLUE, " We will report more when we get more information");
                    SendClientMessageToAll(COLOR_CYAN, "____________Latest News____________");
                    return 1;
}
Reply
#2

Put #endif after OnFilterScriptInt or I don't know i can't check right now, i am far away from home.
Reply
#3

yea put
pawn Код:
#endif
at the end of the cmd or add it to the gm u have it
Reply
#4

What's the difference if i put it on the bottom of my script? i still do not have errors if i put it there.
Reply
#5

you should put it in the end of the script cuz it end of file. so it will work
Reply
#6

Since 1 year of scripting i have never implemented that fuction, i used to use strcmp o.O but thanks anyway guys
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)