Raised This Month: $ Target: $400
 0% 

Solved new line char


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
KiLLeR.
Senior Member
Join Date: Jul 2014
Location: Bulgaria
Old 07-18-2017 , 12:29   new line char
Reply With Quote #1

Is the '^n' char equal for all operating systems in amxx?

File:
Code:
line1
line2
line3

line4
line5
Code:
Code:
new f = fopen(blc_file, "rt");         if(f)     {         new text[32];         server_print("** Reading file:");         while(!feof(f))         {             fgets(f, text, charsmax(text));                         if(!text[0] || text[0] == ';' || text[0] == '^n')                 continue;                         server_print(text);         }                 fclose(f);     }
Output:
Code:
** Reading file:
line1

line2

line3

line4

line5
I want to remove empty lines?!?!

Last edited by KiLLeR.; 08-27-2017 at 15:22.
KiLLeR. 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 22:44.


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