foreach
#1

Can i do that?

Код:
foreach(new i : Player)
{
// BLABLBA
for(new a = 0; a < MAX_PLAYERS; a ++)
{
//BLABLA
}
}
Reply
#2

WHY WOULD YOU DO THAT? Please before using some code check documentation which explains how and why it is used.
foreach(new i : Player) will loop every single connected player and store id in i. The thing you're doing is nonsense you're doing exactly the same(inefficient) thing inside that loop?
Reply
#3

I don't care it'is have sense or no, but server no crash from it?
Reply
#4

Server should not crash but it's absurd to have something like that.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)