Little Help
#1

I create a register system and i got one warning

Код:
C:\Documents and Settings\Korisnik\Desktop\Programi\G.R.P\filterscripts\ConnectPanel.pwn(495) : warning 225: unreachable code
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
pawn Код:
new name[MAX_PLAYER_NAME], file[256], string[300];
        GetPlayerName(playerid, name, sizeof(name));
        format(file, sizeof(file), SERVER_USER_FILE, name);
        if(!response) return ShowPlayerDialog(playerid,13,DIALOG_STYLE_LIST,"{00FFFF}Connect Panel by {FEFEFE}SpiderWalk","{00FFFF}Register/Login\nAnti Spawn Kill {FEFEFE}Settings\n{00FFFF}Player {FEFEFE}Settings","Select","Back");
        {
            format(string, sizeof (string),embed_white"Welcome "embed_blue"%s"embed_white"\n\nPlease register your account:\nPassword must be min 4 characters", name);
            return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT,"Register", string,"Register","Back");
        }
        dini_Create(file);
        dini_IntSet(file, "Password", udb_hash(inputtext));
        dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][pAdminLevel] = 0);
        dini_IntSet(file, "Money",PlayerInfo[playerid][pCash] = 500);
        dini_IntSet(file, "Score",PlayerInfo[playerid][pScore] = 0);
        format(string, 128, "{00FFFF}[SYSTEM]{FEFEFE}You have been {00FFFF}registred{FEFEFE}.Thank you.", name, inputtext);
        SendClientMessage(playerid, COLOR_YELLOW, string);
        gPlayerLogged[playerid] = 1;
Reply
#2

I could not figure out BY MYSELF which one is the warning line.
Reply
#3

pawn Код:
if(!response) return ShowPlayerDialog(playerid,13,DIALOG_STYLE_LIST,"{00FFFF}Connect Panel by {FEFEFE}SpiderWalk","{00FFFF}Register/Login\nAnti Spawn Kill {FEFEFE}Settings\n{00FFFF}Player {FEFEFE}Settings","Select","Back");
        {
            format(string, sizeof (string),embed_white"Welcome "embed_blue"%s"embed_white"\n\nPlease register your account:\nPassword must be min 4 characters", name);
            return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT,"Register", string,"Register","Back");
        }
you have if(!response) return .. and then you open the brackets, return another value and then close?
Reply
#4

Quote:
Originally Posted by Jack_Leslie
Посмотреть сообщение
pawn Код:
if(!response) return ShowPlayerDialog(playerid,13,DIALOG_STYLE_LIST,"{00FFFF}Connect Panel by {FEFEFE}SpiderWalk","{00FFFF}Register/Login\nAnti Spawn Kill {FEFEFE}Settings\n{00FFFF}Player {FEFEFE}Settings","Select","Back");
        {
            format(string, sizeof (string),embed_white"Welcome "embed_blue"%s"embed_white"\n\nPlease register your account:\nPassword must be min 4 characters", name);
            return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT,"Register", string,"Register","Back");
        }
you have if(!response) return .. and then you open the brackets, return another value and then close?
I dont understand i cant find that warning to fix it
Reply
#5

Quote:
Originally Posted by SpiderWalk
Посмотреть сообщение
I dont understand i cant find that warning to fix it
pawn Код:
new name[MAX_PLAYER_NAME], file[256], string[300];
        GetPlayerName(playerid, name, sizeof(name));
        format(file, sizeof(file), SERVER_USER_FILE, name);
        if(!response)
        {
            format(string, sizeof (string),embed_white"Welcome "embed_blue"%s"embed_white"\n\nPlease register your account:\nPassword must be min 4 characters", name);
            return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT,"Register", string,"Register","Back");
        }
        dini_Create(file);
        dini_IntSet(file, "Password", udb_hash(inputtext));
        dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][pAdminLevel] = 0);
        dini_IntSet(file, "Money",PlayerInfo[playerid][pCash] = 500);
        dini_IntSet(file, "Score",PlayerInfo[playerid][pScore] = 0);
        format(string, 128, "{00FFFF}[SYSTEM]{FEFEFE}You have been {00FFFF}registred{FEFEFE}.Thank you.", name, inputtext);
        SendClientMessage(playerid, COLOR_YELLOW, string);
        gPlayerLogged[playerid] = 1;
Reply
#6

What is your dialog about?
Reply
#7

pawn Код:
new name[MAX_PLAYER_NAME], file[256], string[300];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), SERVER_USER_FILE, name);
if(!response)
{
    format(string, sizeof (string),embed_white"Welcome "embed_blue"%s"embed_white"\n\nPlease register your account:\nPassword must be min 4 characters", name);
    return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT,"Register", string,"Register","Back");
}
dini_Create(file);
dini_IntSet(file, "Password", udb_hash(inputtext));
dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][pAdminLevel] = 0);
dini_IntSet(file, "Money",PlayerInfo[playerid][pCash] = 500);
dini_IntSet(file, "Score",PlayerInfo[playerid][pScore] = 0);
format(string, 128, "{00FFFF}[SYSTEM]{FEFEFE}You have been {00FFFF}registred{FEFEFE}.Thank you.", name, inputtext);
SendClientMessage(playerid, COLOR_YELLOW, string);
gPlayerLogged[playerid] = 1;
EDIT: Jack was faster.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)