CMD problem
#6

Quote:
Originally Posted by PowerPC603
Посмотреть сообщение
pawn Код:
new aMsg[35], Count = 0, i;
You forgot to define a new variable with name "i".
With foreach, you don't need to unless you use in the form of 'foreach(new i : Player)'. In this case, you can use 'foreach(Player, i)' and it will automatically define the variable. In the back of my mind, I remember someone calling this method outdated, but I have been too lazy to actually research it. I doubt it has any significant side effects because I have used that method in all of my codes. Others don't seem to encounter issues with it.

EDIT: By the way, the issue was the first 'if' statement was the only one being called in the loop. If he had of used 'else if' statements, this would of worked.
Reply


Messages In This Thread
CMD problem - by DarkLored - 06.02.2014, 02:27
Re: CMD problem - by Hoborific - 06.02.2014, 02:32
Re: CMD problem - by Threshold - 06.02.2014, 03:17
Re: CMD problem - by PowerPC603 - 06.02.2014, 07:39
Re: CMD problem - by Vanter - 06.02.2014, 08:48
Re: CMD problem - by Threshold - 06.02.2014, 09:06

Forum Jump:


Users browsing this thread: 2 Guest(s)