Whats wrong with this? -
patfay - 09.04.2011
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.
Re: Whats wrong with this? -
Stigg - 09.04.2011
Your missiing a ";" somewhere.
Re: Whats wrong with this? -
Cypress - 09.04.2011
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." );
}
Re: Whats wrong with this? -
playbox12 - 09.04.2011
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..
Re: Whats wrong with this? -
patfay - 09.04.2011
Cypresses didnt work, but playbox's did... thanks!
Re: Whats wrong with this? -
Cypress - 09.04.2011
Quote:
Originally Posted by patfay
Cypresses didnt work, but playbox's did... thanks!
|
There is no difference, it's the same.
Re: Whats wrong with this? -
patfay - 09.04.2011
I was getting warnings with yours though, either way its resolved..