Raised This Month: $ Target: $400
 0% 

Client Checker (1.0.1) [Update 02-25-2007] SQL Support


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Crazed
Member
Join Date: Oct 2006
Old 10-22-2006 , 09:09   Re: [Update] Client Checker
Reply With Quote #7

Had a bug while loading the chk_cvars.cfg file. This was because I first didnt had any comments in that file added this later and forgot to update the old code properly.

Old code:
PHP Code:
new fp=fopen(cc_configfile"rt")
    
lines 0
    
new left[64], right[64]
    while  (!
feof(fp)) {
        
fgets(fpbuf63)
        
trim(buf)
        if (
strlen(buf) > 0) {
            
strtok(bufleft63right63' ')
            
// Check if line is not a comment
            
if (strcmp(left"//"))
                
cvars_buf[lines] = buf
        
}
        
lines++
    }
    
fclose(fp
New code:
PHP Code:
new fp=fopen(cc_configfile"rt")
        
cvar_items 0
        
while  (!feof(fp)) 
        {
            
fgets(fpbuf63)
            
trim(buf)
            if (
strlen(buf) > 0
            {
                
// Check if line starts with comment sign
                
if (strfind(buf"//"00) != 0)
                {
                    
cvars_buf[cvar_items] = buf
                    cvar_items
++
                }
            }
        }
        
fclose(fp

Last edited by Crazed; 10-22-2006 at 09:39.
Crazed 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 11:10.


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