Whats wrong with this?
#1

Alright, well i created a command to enter/exit an airport (its not finished yet, as i havent mapped in the inside yet) but when I try and compile it I get a bunch of errors/warnings..

Command:
pawn Код:
command(airport, playerid, params[])
{
#pragma unused params
    {
         if( IsPlayerInRangeOfPoint( playerid, 5.0, -1407.09, -300.28, 14.15))
              {
                    SetPlayerInterior( playerid, 1 );
                    SetPlayerPos( playerid, 620.584, -596.347, 16.945 );
              }
         }
         else if( IsPlayerInRangeOfPoint( playerid, 5.0, -1407.09, -300.28, 14.15))
              {
                    SetPlayerInterior( playerid, 1 );
                    SetPlayerPos( playerid, 620.584, -596.347, 16.945 );
              }
         }
         return SendClientMessage( playerid, -1, "You're not in the right position." );
}
Line 13233 is the top
Line 13250 is the bottom

Errors:
pawn Код:
C:\Users\Brandona_2\Desktop\Carnage Roleplay\gamemodes\VortexRoleplay.pwn(13243) : warning 217: loose indentation
C:\Users\Brandona_2\Desktop\Carnage Roleplay\gamemodes\VortexRoleplay.pwn(13243) : error 029: invalid expression, assumed zero
C:\Users\Brandona_2\Desktop\Carnage Roleplay\gamemodes\VortexRoleplay.pwn(13243) : warning 215: expression has no effect
C:\Users\Brandona_2\Desktop\Carnage Roleplay\gamemodes\VortexRoleplay.pwn(13243) : error 001: expected token: ";", but found "if"
C:\Users\Brandona_2\Desktop\Carnage Roleplay\gamemodes\VortexRoleplay.pwn(13249) : error 010: invalid function or declaration
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.
Reply
#2

Your missiing a ";" somewhere.
Reply
#3

pawn Код:
command(airport, playerid, params[])
{
   #pragma unused params
   if( IsPlayerInRangeOfPoint( playerid, 5.0, -1407.09, -300.28, 14.15))
   {
        SetPlayerInterior( playerid, 1 );
        SetPlayerPos( playerid, 620.584, -596.347, 16.945 );
   }      
   else if( IsPlayerInRangeOfPoint( playerid, 5.0, -1407.09, -300.28, 14.15))
   {
        SetPlayerInterior( playerid, 1 );
        SetPlayerPos( playerid, 620.584, -596.347, 16.945 );
   }
   return SendClientMessage( playerid, -1, "You're not in the right position." );
}
Reply
#4

pawn Код:
command(airport, playerid, params[])
{
    #pragma unused params
    if( IsPlayerInRangeOfPoint( playerid, 5.0, -1407.09, -300.28, 14.15))
    {
        SetPlayerInterior( playerid, 1 );
        SetPlayerPos( playerid, 620.584, -596.347, 16.945 );
    }
    else if( IsPlayerInRangeOfPoint( playerid, 5.0, -1407.09, -300.28, 14.15))
    {
        SetPlayerInterior( playerid, 1 );
        SetPlayerPos( playerid, 620.584, -596.347, 16.945 );
    }
    return SendClientMessage( playerid, -1, "You're not in the right position." );
}
EDIT: You were faster, sorry Cypress
Damn I'm getting slow..
Reply
#5

Cypresses didnt work, but playbox's did... thanks!
Reply
#6

Quote:
Originally Posted by patfay
Посмотреть сообщение
Cypresses didnt work, but playbox's did... thanks!
There is no difference, it's the same.
Reply
#7

I was getting warnings with yours though, either way its resolved..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)