while statement
#1

Hey people. I just wanna ask a doubt regarding "while" statement.

If we're using " if " statement then we can use "else" but when using "while" else cant be added along with it, pop up an error when using it. What do we supposed to add instead of "else" for "while" ?

Eg code:

pawn Код:
while(rows != 0)
    {
        new
            username[24];

        rows --;
        cache_get_field_content(ID, "user",username, mysql, 24);
        ID ++;
        format(output, sizeof(output), "%s"ccwhite"%d. %s\n", output, ID, username);
        ShowPlayerDialog(playerid, 212, DIALOG_STYLE_MSGBOX, "Level 1 Admins", output, "OK", "Cancel");
    }
    else { //  <--- it gives an error here
    //bla bla
    }
Reply


Messages In This Thread
while statement - by Bondage - 21.01.2015, 13:16
Re: while statement - by Rodney Francalim - 21.01.2015, 13:34
Re: while statement - by BroZeus - 21.01.2015, 13:41
Re: while statement - by Bondage - 21.01.2015, 13:44
Re: while statement - by BroZeus - 21.01.2015, 13:49
Re: while statement - by PowerPC603 - 21.01.2015, 14:43
Re: while statement - by Bondage - 21.01.2015, 15:05

Forum Jump:


Users browsing this thread: 1 Guest(s)