dialog input
#3

Quote:
Originally Posted by Koala818
Посмотреть сообщение
pawn Код:
while(cmdplayers[i++]!=-1)
Using ++ after the variable returns the old value. So it will start by checking if "cmdplayers[0]" is not -1 and in the code inside the loop "i" will be 1. You could declare "i" with default value of -1 and use "++i" instead.

But if any value is not -1, the loop will stop so it won't work even you had changed the above. Use a for loop instead and check if the value is not -1 in an if statement.
Reply


Messages In This Thread
dialog input - by DavidBilla - 08.06.2014, 18:44
Re: dialog input - by Koala818 - 08.06.2014, 19:03
Re: dialog input - by Konstantinos - 08.06.2014, 19:09
Re: dialog input - by Koala818 - 08.06.2014, 19:16
Re: dialog input - by Konstantinos - 08.06.2014, 19:20
Re: dialog input - by Koala818 - 08.06.2014, 19:27
Re: dialog input - by Konstantinos - 08.06.2014, 19:40
Re: dialog input - by DavidBilla - 08.06.2014, 19:45
Re: dialog input - by DavidBilla - 11.06.2014, 19:05

Forum Jump:


Users browsing this thread: 2 Guest(s)