Rank in a for loop
I don't know how to explain this, so:
Code:
|
Re: Rank in a for loop
PHP Code:
|
Re: Rank in a for loop
Explain where/how info is stored that determines a players rank. Are players already in order of ranks in that array.
Mxnn, you should not declare variables within a loop. |
Re: Rank in a for loop
Quote:
|
Re: Rank in a for loop
Quote:
By adding new to a for loop you basically delete and realloc memory for every cycle. It is just a use of CPU for something that can be avoided or something useless. Ex: PHP Code:
PHP Code:
|
Re: Rank in a for loop
Quote:
|
Re: Rank in a for loop
I edited my post.
Thanks for the tip Bugsy. I do it so because i have seen it in some plugins |
Re: Rank in a for loop
Quote:
PHP Code:
|
Re: Rank in a for loop
Quote:
@Mxnn: Thanks, I'll give it a try later, I can't test anything right now and they are talking about this -> http://wiki.alliedmods.net/Optimizin...ables_in_Loops. |
Re: Rank in a for loop
Ohhh, i missunderstood, sorry!
@tm. My post is an example. I don't know what class of data you want to put in order. |
| All times are GMT -4. The time now is 07:10. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.