Raised This Month: $ Target: $400
 0% 

[Solved]How to count the connections to the server?


Post New Thread Reply   
 
Thread Tools Display Modes
RedRobster
Veteran Member
Join Date: Apr 2010
Location: Your Closet
Old 07-15-2010 , 12:54   Re: How to count the connections to the server?
Reply With Quote #11

Quote:
Originally Posted by hleV View Post
You're thinking correctly, but ++i and i++ result in the same thing in a loop. So in both loops first and last i will be 0 and 14.
Code:
new i = 10;

if (++i == 10) // If 11 is equal to 10 { // i is now 11 }


Code:
new i = 10;

if (i++ == 10) // If 10 is equal to 10 { // i is now 11 }

Ah, okay. Thanks.
RedRobster is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 07-15-2010 , 13:56   Re: [Solved]How to count the connections to the server?
Reply With Quote #12

The difference is the value returned by each. In the code above it would not matter because the return value is not being used.

a = 0
b = a++ //b will be 0, a = 1

a = 0
b = ++a //b will be 1, a = 1
__________________
Bugsy is offline
Reply



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 07:15.


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