![]() |
cool summon
summons people if you spell their name wrong!!!
account/nickname:- Sidney/feltcher, Darlene/snowblower, PFA/starfish [/summon] Sid, felt - Summons Sidney Dar, snow - Summons Darlene PFA, star - Summons PFA PHP Code:
|
You might consider using something like this that was posted by me. There is a whole thread about this in the code gallery, called 'Function findName()'.
PHP Code:
And then please, use braces for each function so you do this: PHP Code:
PHP Code:
|
Quote:
And Sidney, I would suggest using PHP Code:
Quote:
And it isn't spelled 'braces', that something different :p |
Quote:
Braces: { } Brackets: [ ] And I am checking if there is an exact match first, THEN if there is starting, not just exact ... |
Quote:
( ) round brackets or parentheses [ ] square brackets or box brackets { } curly brackets or braces < > angle brackets or chevrons braces is kind of a synonym for brackets And, from the wiki: Quote:
Quote:
And you don't need 4 for loops to check obj.starts() and obj equals, could be done in 2 for loops, actually even in 1 for loop.. |
It was an example, I know it could be optimized better. It was just to show the type of thing you could do.
About the braces -- I've always heard {} were braces, () were parenthesis, and [] were brackets. Perhaps I've taken the wrong computer classes, or just not a large enough variety of them. |
I call {} curly braces. It's sort of redundant, though, now that I look at it...
|
Quote:
|
Quote:
|
Quote:
|
| All times are GMT +2. The time now is 12:52 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.