Warning 225: unreachable code
#1

first Ask for understanding.

my english ask skill, very lack

my error code is unreachable

i know unreachable source

unreachable error code is
1.return 1;}{
2.return 1;} return 1;

why my code unreachable occur ?

this input do occur unreachable.

Код:
if(dialogid == DIALOG_LOGIN+1) 
{
         if(response)
         {
			if(strlen(inputtext) < 4 || strlen(inputtext) > 16 || !strlen(inputtext)){
			return ShowPlayerLoginDialog(playerid, gPlayerAccount[playerid]);
			new password[64];
			strmid(password, inputtext, 0, strlen(inputtext), 255);
			Encrypt(password);
			OnPlayerRegister(playerid,password);
		}
		else
		{
			SendClientMessage(playerid, COLOR_YELLOW, "[!] "#C_WHITE" msg ");
			Kick(playerid);
			return 1;
		}
	}
}
And

Код:
if(dialogid == DIALOG_LOGIN+1) 
{
         if(response)
         {
			if(strlen(inputtext) < 4 || strlen(inputtext) > 16 || !strlen(inputtext)){
			return ShowPlayerLoginDialog(playerid, gPlayerAccount[playerid]);
			new password[64];
			strmid(password, inputtext, 0, strlen(inputtext), 255);
			Encrypt(password);
			OnPlayerRegister(playerid,password);
		}
		else
		{
			SendClientMessage(playerid, COLOR_YELLOW, "[!] "#C_WHITE" msg ");
			Kick(playerid);
			return 1;
		}
	}
ths last this } out = pawno error occur

i need solution
Reply
#2

Try like this.
Код:
if(dialogid == DIALOG_LOGIN+1) 
{
         if(response)
         {
		if(strlen(inputtext) < 4 || strlen(inputtext) > 16 || !strlen(inputtext))
		{
			return ShowPlayerLoginDialog(playerid, gPlayerAccount[playerid]);
		} // <- We closed the brace here, freeing the next code from this ^ conditional statement
		new password[64];
		strmid(password, inputtext, 0, strlen(inputtext), 255);
		Encrypt(password);
		OnPlayerRegister(playerid,password);
	}
	else
	{
		SendClientMessage(playerid, COLOR_YELLOW, "[!] "#C_WHITE" msg ");
		Kick(playerid);
	}
}
EDIT: I forgot to ask for understanding, sorry.

Quote:

first Ask for understanding.

Reply
#3

Try

PHP код:
if(dialogid == DIALOG_LOGIN+1
{
         if(
response)
         {
            if(
strlen(inputtext) < || strlen(inputtext) > 16 || !strlen(inputtext)){
            return 
ShowPlayerLoginDialog(playeridgPlayerAccount[playerid]);
            new 
password[64];
            
strmid(passwordinputtext0strlen(inputtext), 255);
            
Encrypt(password);
            
OnPlayerRegister(playerid,password);
        }
        else
        {
            
SendClientMessage(playeridCOLOR_YELLOW"[!] "#C_WHITE" msg ");
            
Kick(playerid); 
return 1;
PHP код:
}
    }

PHP код:
if(dialogid == DIALOG_LOGIN+1
{
         if(
response)
         {
            if(
strlen(inputtext) < || strlen(inputtext) > 16 || !strlen(inputtext)){
            return 
ShowPlayerLoginDialog(playeridgPlayerAccount[playerid]);
            new 
password[64];
            
strmid(passwordinputtext0strlen(inputtext), 255);
            
Encrypt(password);
            
OnPlayerRegister(playerid,password);
        }
        else
        {
            
SendClientMessage(playeridCOLOR_YELLOW"[!] "#C_WHITE" msg ");
            
Kick(playerid); 
return 1;
PHP код:
}
    } 
Clear Line Red
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)