Quote:
|
Originally Posted by falco10291029
Actually the for-each command can replace with, and the for loop cant without using with, so yes i believe it can, plus stefan said himself that it's meant to.
|
It doesn't replace with, if it did, this would work:
PHP Code:
for(pl: allplayers) {
client.test = "blah";
}
but it doesn't.
you still have to do:
PHP Code:
for(pl: allplayers) {
with(findPlayer(pl.account)) {
client.test = "blah";
}
}
You can also just aswell do:
PHP Code:
allplayers[index].account
no need for a foreach loop at all.