WARNING 225 [Need Help]
#1

recive
Код:
F:\GTA San Andreas\111\0.3x\filterscripts\Places.pwn(158) : warning 225: unreachable code
warning line:
Код:
	if (strcmp(cmdtext,"/exit",true,5)==0)
Код:
	if (strcmp(cmdtext,"/exit",true,5)==0)
	{
	if (IsPlayerInRangeOfPoint(playerid, 5, 246.375991,109.245994,1003.218750))
	SetPlayerInterior(playerid,0);
	SetPlayerPos(playerid,1563.5604,-1675.2515,16.1953);
	SendClientMessage(playerid,-1,"You leave "GREEN"LSPD"WHITE" building");
	if (IsPlayerInRangeOfPoint(playerid, 5,366.5,162.69921875,1013.5999755859))
	SetPlayerInterior(playerid,0);
	SetPlayerPos(playerid,607.1945,-1522.2202,15.0735);
	SendClientMessage(playerid,-1,"You leave "GREEN"LSFD"WHITE"building");
	return 1;
	}
	else
	{
	SendClientMessage(playerid,-1,"SERVER: You are't on exit point");
        return 1;
	}
	}
	return 0;
}
Reply
#2

try this

if(!strcmp(cmdtext, "/exit", true))
{
if(IsPlayerInRangeOfPoint(playerid, 5, 246.375991,109.245994,1003.218750))
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,1563.5604,-1675.2515,16.1953);
SendClientMessage(playerid,-1,"You leave "GREEN"LSPD"WHITE" building");
}
if (IsPlayerInRangeOfPoint(playerid, 5,366.5,162.69921875,1013.5999755859))
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,607.1945,-1522.2202,15.0735);
SendClientMessage(playerid,-1,"You leave "GREEN"LSFD"WHITE"building");
}
else
{
SendClientMessage(playerid,-1,"SERVER: You are't on exit point");
return 1;
}
return 0;
}
Reply
#3

still error
whats wrong
Reply
#4

its doing now?
Reply
#5

Try this:

pawn Код:
if (strcmp(cmdtext,"/exit",true,5)==0)
    {
    if (IsPlayerInRangeOfPoint(playerid, 5, 246.375991,109.245994,1003.218750))
        {
    SetPlayerInterior(playerid,0);
    SetPlayerPos(playerid,1563.5604,-1675.2515,16.1953);
    SendClientMessage(playerid,-1,"You leave "GREEN"LSPD"WHITE" building");
        }
    if (IsPlayerInRangeOfPoint(playerid, 5,366.5,162.69921875,1013.5999755859))
        {
    SetPlayerInterior(playerid,0);
    SetPlayerPos(playerid,607.1945,-1522.2202,15.0735);
    SendClientMessage(playerid,-1,"You leave "GREEN"LSFD"WHITE"building");
    return 1;
    }
    else
    {
    SendClientMessage(playerid,-1,"SERVER: You are't on exit point");
        return 1;
    }
    }
    return 0;
}
Reply
#6

i try your offers but
errors added
and 225 error dont fixed
Reply
#7

Indentation! Do it!
Reply
#8

dont work
i use indentations

have team Viewr vince?
Reply
#9

I guess you want to do:
pawn Код:
if (strcmp(cmdtext,"/exit",true,5)==0)
{
    if (IsPlayerInRangeOfPoint(playerid, 5, 246.375991,109.245994,1003.218750))
    {
        SetPlayerInterior(playerid,0);
        SetPlayerPos(playerid,1563.5604,-1675.2515,16.1953);
        SendClientMessage(playerid,-1,"You leave "GREEN"LSPD"WHITE" building");
    }
    else if (IsPlayerInRangeOfPoint(playerid, 5,366.5,162.69921875,1013.5999755859))
    {
        SetPlayerInterior(playerid,0);
        SetPlayerPos(playerid,607.1945,-1522.2202,15.0735);
        SendClientMessage(playerid,-1,"You leave "GREEN"LSFD"WHITE"building");
        return 1;
    }
    else
    {
        SendClientMessage(playerid,-1,"SERVER: You are't on exit point");
            return 1;
    }
    return 0;
}
The if-code is wrong. If you don't add bracket after if check, only the following 1 statement will be ran, instead of more than 1.
You sure GREEN and WHITE are correctly defined, i.e.
pawn Код:
#define GREEN "{00FF00}"
#define WHITE "{FFFFFF}"
?
Reply
#10

dont work

i do it but dont work
its possible prob is for before commands?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)