Raised This Month: $ Target: $400
 0% 

about id = str_to_num


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 05-04-2010 , 01:38   Re: about id = str_to_num
Reply With Quote #4

Quote:
Originally Posted by epic . View Post
I still confused.
What`s the difference between this :
Code:
public bot_interface()
{
    for ( new i = 0 ; i < iNum ; i++ )
    {
        id = iPlayers[i];
    }
}
In the first situation, a command executed in the console by a player is being processed. Like if you do in console

Code:
command 27
The id is in the middle of a string, so it is converted from a string to a number. "27" becomes 27.

In the second situation you are using a loop that is used to do some action over all players (using their ID's).

Basically, "ID" means the same in both examples but its used in different contexts.
__________________
joaquimandrade 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 03:40.


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