9 FREAKING ERRORS I CANNOT FIX THEM !!!! I NEED SERIOUS HELP
#1

IAM REALLY MAD AND WHEN IAM USING CAPS ITS COOLING ME DOWN, AND I'VE BEEN TRYING TO FIX THESE FUCKING ERRORS AND THEY DONT WANT TO FUCKING GET FIXED AND IAM JUST MAD AND I NEED SOMEONE'S HELP IF YOU CAN HELP ME!!!!!!!!!!!!

Script:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/enter", cmdtext, true, 10) == 0)
    {
            if (PlayerToPoint(1, playerid, -2660.8972,1423.4766,906.4609))
            {
                SetPlayerPos(playerid, 1630.1722,1789.5437,10.8203);
                SendClientMessage(playerid, 0xFF8080FF, " Elevator: Press the 'R' button to lift up to the roof top (( /roof )) ");
                }
            }
    return 1;
        }
   
    if (strcmp("/roof", cmdtext, true, 10) == 0) // Line 50
    {
      if (elevused[playerid] == 0) // Line 52
        {
            if (PlayerToPoint(4, playerid, 1630.1722,1789.5437,10.8203)) // Line 54
            {
                SendClientMessage(playerid, 0xFF8080FF, " Elevator: You're being lifted up ");
                SetTimer("liftup1", 2000, 1);
                }
            }
    return 1; // Line 60
        }
   
    if (strcmp("/exit", cmdtext, true, 10) == 0) // Line 63
    {
      if (elevused[playerid] == 1) // Line 65
      {
        if (PlayerToPoint(4, playerid, 1630.1722, 1789.5437, 10.8203)) // Line 67
        {
          SetPlayerPos(playerid, 1628.8466,1780.0254,30.4688);
          }
            }
    return 1; // Line 72
        }
    return 0; // Line 74
}
Scroll down to see full of the script!!!

here are the errors after compiling:

Код:
C:\Users\Soka\Desktop\Server\elevator.pwn(50) : error 010: invalid function or declaration
C:\Users\Soka\Desktop\Server\elevator.pwn(52) : error 010: invalid function or declaration
C:\Users\Soka\Desktop\Server\elevator.pwn(54) : error 010: invalid function or declaration
C:\Users\Soka\Desktop\Server\elevator.pwn(60) : error 010: invalid function or declaration
C:\Users\Soka\Desktop\Server\elevator.pwn(63) : error 010: invalid function or declaration
C:\Users\Soka\Desktop\Server\elevator.pwn(65) : error 010: invalid function or declaration
C:\Users\Soka\Desktop\Server\elevator.pwn(67) : error 010: invalid function or declaration
C:\Users\Soka\Desktop\Server\elevator.pwn(72) : error 010: invalid function or declaration
C:\Users\Soka\Desktop\Server\elevator.pwn(74) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


9 Errors.
I WILL BE REALLY GREATFULL AND THANKFULL TO WHO WILL HELP ME!!!
Reply
#2

With /enter command I think you have 1 extra "}" that causes troubles. Look if all brackets match.
Reply
#3

LOL @ ME how could i miss that

really thank you man, you rescued me... i was nearly fired from my job !
Reply
#4

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/enter", cmdtext, true) == 0)
    {
            if (PlayerToPoint(1, playerid, -2660.8972,1423.4766,906.4609))
            {
                SetPlayerPos(playerid, 1630.1722,1789.5437,10.8203);
                SendClientMessage(playerid, 0xFF8080FF, " Elevator: Press the 'R' button to lift up to the roof top (( /roof )) ");
                return 1;
            }
    }
    if (strcmp("/roof", cmdtext, true) == 0) // Line 50
    {
      if (elevused[playerid] == 0) // Line 52
        {
            if (PlayerToPoint(4, playerid, 1630.1722,1789.5437,10.8203)) // Line 54
            {
                SendClientMessage(playerid, 0xFF8080FF, " Elevator: You're being lifted up ");
                SetTimer("liftup1", 2000, 1);
                return 1;
            }
        }
    }
    if (strcmp("/exit", cmdtext, true) == 0) // Line 63
    {
        if (elevused[playerid] == 1) // Line 65
        {
            if (PlayerToPoint(4, playerid, 1630.1722, 1789.5437, 10.8203)) // Line 67
            {
                SetPlayerPos(playerid, 1628.8466,1780.0254,30.4688);
                return 1;
            }
        }
    }
    return 0; // Line 74
}
Reply
#5

Quote:
Originally Posted by //exora
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/enter", cmdtext, true) == 0)
    {
            if (PlayerToPoint(1, playerid, -2660.8972,1423.4766,906.4609))
            {
                SetPlayerPos(playerid, 1630.1722,1789.5437,10.8203);
                SendClientMessage(playerid, 0xFF8080FF, " Elevator: Press the 'R' button to lift up to the roof top (( /roof )) ");
                return 1;
            }
    }
    if (strcmp("/roof", cmdtext, true) == 0) // Line 50
    {
      if (elevused[playerid] == 0) // Line 52
        {
            if (PlayerToPoint(4, playerid, 1630.1722,1789.5437,10.8203)) // Line 54
            {
                SendClientMessage(playerid, 0xFF8080FF, " Elevator: You're being lifted up ");
                SetTimer("liftup1", 2000, 1);
                return 1;
            }
        }
    }
    if (strcmp("/exit", cmdtext, true) == 0) // Line 63
    {
        if (elevused[playerid] == 1) // Line 65
        {
            if (PlayerToPoint(4, playerid, 1630.1722, 1789.5437, 10.8203)) // Line 67
            {
                SetPlayerPos(playerid, 1628.8466,1780.0254,30.4688);
                return 1;
            }
        }
    }
    return 0; // Line 74
}
Each time i type a command it says Unknown Command, help.
Reply
#6

I thought you got it fixed?

EDIT: In exora's code return 1; comes only when player is typing the command AND is near the point also.
Reply
#7

It is fixed, but somehow they're not working, so i tried exora's one, and it is telling me Unknown Command
Reply
#8

LOL @ Nerdrage, diaf.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)