Quote:
Originally Posted by Chompy
Actually, she was using a method for finding names that started with the parameter, yours check if it equals.
And Sidney, I would suggest using
PHP Code:
...
for(temp.i : players) {
if (i.account.pos(chat) > -1 || i.nick.pos(chat) > -1 || i.communityname.pos(chat) > -1) {
i = i.account;
break;
}
}
...
or something like that, so if their nick/account/community contains the parameter, it will return their account, instead of just checking if their account/nick etc. starts with the parameter
You don't need them if there is a single line action after the if statement, it's all about personal preference.
And it isn't spelled 'braces', that something different 
|
No, they are braces.
Braces: { }
Brackets: [ ]
And I am checking if there is an exact match first, THEN if there is starting, not just exact ...