Thread: cool summon
View Single Post
  #4  
Old 04-03-2008, 09:45 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Chompy View Post
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.players) {
  if (
i.account.pos(chat) > -|| i.nick.pos(chat) > -1  || i.communityname.pos(chat) > -1) {
    
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 ...
__________________
Reply With Quote