[RESOLVED] How read a section of a file?
#1

Hi,

I want read only a section of a file, delimited with a start and a end, exemple:

Код:
section1_start
s1_line1
s1_line2
section1_end
section2_start
s2_line1
s2_line2
s2_line3
section2_end
section3_start
s3_line1
section3_end
For exemple, I want read only section2 lines:
Код:
s2_line1
s2_line2
s2_line3
How to do this? thanks
Reply
#2

This is how ini files are setup. Since the wiki is currently down, go to ******.com and type in "wiki.sa-mp ini" (no quotes), and hit cached on the first link. Read that. It will tell you everything you need to know and show you some example code. I wish I could link you but it's down right now.
Reply
#3

Thank, but what i want to do is different of INI file,

I want read and work with all lines between section2_start and section2_end.
Lines are not in format "key = value", but "value, value, value, value"

How to write.. i don't have words to explain

Edit: i have found! It was easy
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)