Warning 225 : Unreachable code
#1

Hi guys I have a problem with this..


C:\Users\sofie's\Desktop\CCNRRPG\gamemodes\CCNRRPG .pwn(11456) : warning 225: unreachable code
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Warning.

Quote:

if(newkeys & KEY_SECONDARY_ATTACK && PlayerToPoint(1.0, playerid, 247.7420,71.6222,1003.6406)) //FBI Shutter Outside
{
if(GetPlayerSkin(playerid) != 286)
{
SendClientMessage(playerid,COLOR_ERROR,"Access Denied");
return 1;
}

I need help with this. Please Help me!
Reply
#2

indent your code to see your error it is very clear that your missings a closing bracket,
at least from the code you posted you are.

pawn Код:
if((newkeys & KEY_SECONDARY_ATTACK) && PlayerToPoint(1.0, playerid, 247.7420,71.6222,1003.6406)) //FBI Shutter Outside
{
    if(GetPlayerSkin(playerid) != 286)
    {
        SendClientMessage(playerid,COLOR_ERROR,"Access Denied");
        return 1;
    }
}
also notice i wrapped (newkeys & KEY_SECONDARY_ATTACK)
this way you check this, and if its true you check PlayerToPoint,
Reply
#3

pawn Код:
if(newkeys & KEY_SECONDARY_ATTACK && PlayerToPoint(1.0, playerid, 247.7420,71.6222,1003.6406)) //FBI Shutter Outside
{ // Open 1
if(GetPlayerSkin(playerid) != 286)
{ // Open 2
SendClientMessage(playerid,COLOR_ERROR,"Access Denied");
return 1;
} // Close 1
//??? Where's Close 2?
Reply
#4

Okay wait
Reply
#5

brackets cause different errors.
EDIT: The problem doesnt appear to be in this part of the code. Which one is line 11456?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)