error 001: expected token: ";", but found "-identifier-"
#3

Quote:
Originally Posted by dusk
Посмотреть сообщение
You're using the do-while loop wrong.

The syntax is
pawn Код:
do
{
   
}
while(some_statement); // not the semicolon at the end which you are lacking.
If you want to increment "id" each time the loop is executed, you should put in the "do" block.
But why does this compile and works fine;
pawn Код:
stock FindNextSlot()
{
    new id;
    while(groupinfo[id][active]) id ++;
    return id;
}
*taken from a older group script which was made by TheKiller, but edited by me*
And yeah, I don't really understand while-do loops ;_;
Reply


Messages In This Thread
error 001: expected token: ";", but found "-identifier-" - by Kyance - 09.09.2014, 08:14
Re: error 001: expected token: ";", but found "-identifier-" - by dusk - 09.09.2014, 08:18
Re: error 001: expected token: ";", but found "-identifier-" - by Kyance - 09.09.2014, 08:22
Re: error 001: expected token: ";", but found "-identifier-" - by dusk - 09.09.2014, 08:37
Re: error 001: expected token: ";", but found "-identifier-" - by Kyance - 09.09.2014, 09:35

Forum Jump:


Users browsing this thread: 1 Guest(s)