Raised This Month: $ Target: $400
 0% 

Client Cmd registers as CVAR?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 10-23-2005 , 00:57  
Reply With Quote #8

For loops work like this:

Code:
for(initation code; loop condition; iteration code) {    statements }

The initation code is executed once when the loop beings. It is generally used to setup a variable to be used in the loop (ie: new i = 1).

The loop continues to execute the statements over and over again until the loop condition is met. This is usually a simple number counter (ie: i <= get_maxplayers()).

At the end of every iteration, the iteration code is run. Once again, this is generally used to increment the variable you are using to count (ie: i++).



Compare your first for loop with your second for loop, just the very beginning line that defines the loop. You will see the problem eventually.

Code:
for( i = 1; i < get_maxplayers(); i++ )  for( i2 = 1; i2 <get_maxplayers(); i++ )
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:01.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode