unreachable code, loose indentation
#1

this one is fixes >> go below
Reply
#2

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/lxgiwyl", true) == 0)
    {
        SendClientMessage(playerid, 0xF97804FF, "No Thug's Tools For You Moron! xD");
        Kick(playerid);
        return 1;
    }
   
    if(strcmp(cmdtext, "/stateofemergency", true) == 0)
    {
        SendClientMessage(playerid, 0xF97804FF, "CYA go to hell");
        Kick(playerid);
        return 1;
    }
   
    if(strcmp(cmdtext, "/crazytown", true) == 0)
    {
        SendClientMessage(playerid, 0xF97804FF, "^_^");
        Kick(playerid);
        return 1;
    }
   
    if(strcmp(cmdtext, "/anoseonglass", true) == 0)
    {
        SendClientMessage(playerid, 0xF97804FF, "GO watch crank high woltage");
        Kick(playerid);
        return 1;
    }
    if(strcmp(cmdtext, "/fullclip", true) == 0)
    {
        SendClientMessage(playerid, 0xF97804FF, "shoot you'r self in the head");
        Kick(playerid);
        return 1;
    }
   
    return 0;
}
Reply
#3

pawn Код:
if(strcmp(cmdtext, "/cfvfgmj", true) == 0)
    {
        SendClientMessage(playerid, 0xF97804FF, "Have some fog biatch!");
        Kick(playerid);
        return 1;
    }
   
    {
    if (strcmp(cmdtext,"/LV",true,0) == 0)
    {
        if (IsPlayerInAnyVehicle(playerid) == 0)
        {
            if (GetPlayerState(playerid) == 1)
            {
            SendClientMessage(playerid, 0xF97804FF, "Find A Car);
            }
        }
        if (IsPlayerInAnyVehicle(playerid) == 1)
        {
            if (GetPlayerState(playerid) == 3)
            {
            SendClientMessage(playerid, 0xF97804FF, "
You Are not the driver");
            }
        }
        if (IsPlayerInAnyVehicle(playerid) == 0)
        {
            if (GetPlayerState(playerid) == 3)
            {
            new VID;
            VID = GetPlayerVehicleID(playerid);
            SetPlayerPos(VID, 2122.0183, 1430.5382, 11.9497);
            }
        }
        return 1;
    }
return 0; // warning 217: loose indentation
}
 // all below unreachable
ahh damn !
Reply
#4

Put this under include's:
pawn Код:
#pragma tabsize 0
Reply
#5

Quote:
Originally Posted by Clive
Посмотреть сообщение
Put this under include's:
pawn Код:
#pragma tabsize 0
All below still unreachable
Reply
#6

Quote:
Originally Posted by Divine
Посмотреть сообщение
All below still unreachable
I've posted that for 'warning 217: loose indentation' now no need to press Tab.
Reply
#7

because you still have code under the return 0, which will never get called since you terminate it before it gets reached
Reply
#8

Quote:
Originally Posted by dice7
Посмотреть сообщение
because you still have code under the return 0, which will never get called since you terminate it before it gets reached
pawn Код:
}
        }
        return 1;
    }
return 0;  // warning 217: loose indentation
}
// the rest is unreachable
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{

bleh blah whats left other thins...
no codes below... thats my last command in the list
Reply
#9

Are you sure the error is in that file ?
Also post +/-20 lines around that line here
Reply
#10

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/lxgiwyl", true) == 0)
    {
        SendClientMessage(playerid, 0xF97804FF, "No Thug's Tools For You Moron! xD");
        Kick(playerid);
        return 1;
    }
    if(strcmp(cmdtext, "/stateofemergency", true) == 0)
    {
        SendClientMessage(playerid, 0xF97804FF, "CYA go to hell");
        Kick(playerid);
        return 1;
    }
    if(strcmp(cmdtext, "/crazytown", true) == 0)
    {
        SendClientMessage(playerid, 0xF97804FF, "^_^");
        Kick(playerid);
        return 1;
    }
    if(strcmp(cmdtext, "/anoseonglass", true) == 0)
    {
        SendClientMessage(playerid, 0xF97804FF, "GO watch crank high woltage");
        Kick(playerid);
        return 1;
    }
    if(strcmp(cmdtext, "/fullclip", true) == 0)
    {
        SendClientMessage(playerid, 0xF97804FF, "shoot you'r self in the head");
        Kick(playerid);
        return 1;
    }
    if(strcmp(cmdtext, "/cfvfgmj", true) == 0)
    {
        SendClientMessage(playerid, 0xF97804FF, "Have some fog biatch!");
        Kick(playerid);
        return 1;
    }
   
    {
    if (strcmp(cmdtext,"/LV",true,0) == 0)
    {
        if (IsPlayerInAnyVehicle(playerid) == 0)
        {
            if (GetPlayerState(playerid) == 1)
            {
               SendClientMessage(playerid, 0xF97804FF, "Find A Car!");
            }
        }
        if (IsPlayerInAnyVehicle(playerid) == 1)
        {
            if (GetPlayerState(playerid) == 3)
            {
                SendClientMessage(playerid, 0xF97804FF, "You Are not the driver");
            }
        }
        if (IsPlayerInAnyVehicle(playerid) == 0)
        {
            if (GetPlayerState(playerid) == 3)
            {
                new VID;
                VID = GetPlayerVehicleID(playerid);
                SetPlayerPos(VID, 2122.0183, 1430.5382, 11.9497);
            }
        }
        return 1;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)