What's wrong with this command?
#1

pawn Код:
if(strcmp(cmd, "/pddoor", true) == 0)
    {
      if(IsPlayerConnected(playerid))
      {
            GetPlayerName(playerid, sendername, sizeof(sendername));
            if(IsACop(playerid) && IsPlayerInSphere(playerid,246.3890,72.0390,1003.6406,4) && (!pddoor))
            {
                pddoor = 1;
                gate = 4;
                MoveDynamicObject(3, 248.880111, 72.445343, 1002.560546,5);
                MoveDynamicObject(4, 243.894638, 72.445343, 1002.560546,5);
                format(string, sizeof(string), "* %s takes out a key, and unlocks the door.", sendername);
                ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                format(string, sizeof(string), "* %s opens the door.", sendername);
                ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            }
            GetPlayerName(playerid, sendername, sizeof(sendername));
            else if(IsACop(playerid) && IsPlayerInSphere(playerid,246.3890,72.0390,1003.6406,4) && (pddoor))
            {
                pddoor = 0;
                MoveDynamicObject(3, 247.880111, 72.445343, 1002.560546,5);
                MoveDynamicObject(4, 244.894638, 72.445343, 1002.560546,5);
                format(string, sizeof(string), "* %s closes the door. *It Auto Locks*", sendername);
                ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "You are not a police officer!");
            }
        }
        return 1;
    }
When i use it, it comes up with these errors :

Quote:

C:\Documents and Settings\Eric\Desktop\NH-RP2\NHRP Server\gamemodes\nhrp.pwn(21639) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Eric\Desktop\NH-RP2\NHRP Server\gamemodes\nhrp.pwn(21639) : warning 215: expression has no effect
C:\Documents and Settings\Eric\Desktop\NH-RP2\NHRP Server\gamemodes\nhrp.pwn(21639) : error 001: expected token: ";", but found "if"

Any help is greatly appreciated!

- Eric
Reply


Messages In This Thread
What's wrong with this command? - by Tnt12340 - 13.06.2010, 13:01
Re: What's wrong with this command? - by Flashy - 13.06.2010, 13:09
Re: What's wrong with this command? - by Tnt12340 - 13.06.2010, 13:12
Re: What's wrong with this command? - by Flashy - 13.06.2010, 13:13
Re: What's wrong with this command? - by Sergei - 13.06.2010, 13:14
Re: What's wrong with this command? - by Tnt12340 - 13.06.2010, 13:18
Re: What's wrong with this command? - by [XST]O_x - 13.06.2010, 13:20
Re: What's wrong with this command? - by Flashy - 13.06.2010, 13:23
Re: What's wrong with this command? - by Tnt12340 - 13.06.2010, 13:24

Forum Jump:


Users browsing this thread: 1 Guest(s)