Raised This Month: $ Target: $400
 0% 

Reading a file with new system.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
eyal282
Veteran Member
Join Date: Aug 2011
Old 06-30-2017 , 09:50   Re: Reading a file with new system.
Reply With Quote #8

Now it works, I used a variable instead and it is probably better than natives.
PHP Code:
    new NextLine Lines[0];
    new 
CurrentLine;
    while(
fgets(FilePointerTextcharsmax(Text)))
    {            
        
CurrentLine++;
        
client_print(0print_chat"Current Line: %i"CurrentLine);
        if( ( 
ftell(FilePointer) == NextLine && !StripSpaces ) || ( strcmp(Text"") == && StripSpaces ) )
        {
            if(
StripSpaces || ( !StripSpaces && LinesLength != LinesDestroyed ) )
            {
                
LinesDestroyed++;
                
NextLine Lines[LinesDestroyed];
                continue;
            }
        }    
        
        
fputs(TempFilePointerText);

    } 
For some reason, empty lines are not captured. I tried strcmp(Text, "") == 0, !Text[0] and no luck, any reason?

Last edited by eyal282; 06-30-2017 at 10:13.
eyal282 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 23:01.


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