Raised This Month: $ Target: $400
 0% 

Reading from a file


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Drak
Veteran Member
Join Date: Jul 2005
Old 02-04-2007 , 20:25   Re: Reading from a file
Reply With Quote #1

Quote:
Originally Posted by Paladinrocker View Post
Ok I did it, and basically I just had it display a red message if the two steam ids were equal, and green if not, but they ended up all being red. Here's the code:
Code:
public special_steamid(id)
{
    new steamFile = fopen("specialsteamids.txt", "r");
    
    
    if(steamFile)
    {
        new data[128], authId[32], steamId[32];
        while(fgets(steamFile, data, 127))
        {
            parse(data, steamId, 31);
            
            get_user_authid(id, authId, 31);
            if(equal(authId, steamId))
            {
                fclose(steamFile);
                return 1;
            }
        }
    }
    fclose(steamFile);
    return 0;
}
EDIT: Oops, sorry for double-posting.
I don't get it, all that code is doing, checking the SteamID. If correct, close the file.
Drak is offline
Send a message via MSN to Drak
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 00:44.


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