Posts: 68
Threads: 5
Joined: Jul 2015
foreach(new i : Player) or foreach(Player, i) or for(new or 0.3.7 PoolSize AND WHY?
Posts: 455
Threads: 83
Joined: Nov 2009
Reputation:
0
foreach(new i : Player) - optimalization of code.
Posts: 68
Threads: 5
Joined: Jul 2015
Okay. Can you tell me something about other loops?
i.e for(new + IsPlayerConnected and PoolSize + IsPlayerConnected
Posts: 68
Threads: 5
Joined: Jul 2015
Posts: 68
Threads: 5
Joined: Jul 2015
PoolSize is better then foreach?
Posts: 68
Threads: 5
Joined: Jul 2015
Posts: 4,759
Threads: 33
Joined: Dec 2013
Reputation:
0
Use what you want, they are pretty much the same.
Posts: 68
Threads: 5
Joined: Jul 2015
Posts: 109
Threads: 19
Joined: Feb 2015
Reputation:
0
Looping through the players with for(new is better if your server is constantly full.
Other than that, I'd go with foreach(new i : Player)