Quick for-loop question..
Just wondering if my mind serves me correctly from my past C++ experience.
Code:
That would Loop from 2 through maxplayers and Code:
would loop from 1 to maxplayers... correct? thanks |
yes
|
Thanks, chief.
|
Optimization tip of the day: store get_maxplayers in a variable before the for loop, that way it's not called every time.
|
Didn't PM or someone also say something against declaring a variable in the syntax of a for loop (chk2 in this case)?
|
I believe that was because breaking out of the loop before the condition is met results in the memory of the variable (declared within the for-loop using 'new') fails to get released/freed properly..
But wasn't that an issue with the old compiler released by CompuPhase and addressed properly in the newer compiler released with AMXX?? |
| All times are GMT -4. The time now is 09:56. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.