Raised This Month: $ Target: $400
 0% 

Remove new line character from file


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Sn!ff3r
Veteran Member
Join Date: Aug 2007
Location: Poland
Old 04-11-2009 , 18:03   Re: Remove new line character from file
Reply With Quote #3

Hm. Maybe differently. How to permanently remove line from file ?

PHP Code:
public concmd_delete(id,level,cid)
{
    if(!
cmd_access(id,level,cid,2))
        return 
PLUGIN_HANDLED
    
    
static args[33]
    
read_args(args,32)
    
    if(!
strlen(args))
        return 
PLUGIN_HANDLED
    
    
new handler fopen("file.txt""rwt+")
    
    static 
buffer[128]
    while(!
feof(handler))
    {
        
fgets(handlerbuffersizeof buffer 1)
        
        if(
equal/*i-*/(buffer,args))
        {
            
//fprintf(handler, "") // BAD!
            // here i want to remove this line
            
break
        }
    }
    
fclose(handler)    
    return 
PLUGIN_HANDLED

__________________
Join US - custom Zombie Server - Custom Addons:



Sn!ff3r is offline
Send a message via Skype™ to Sn!ff3r
 



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 02:25.


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