Read from file - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Read from file (
/showthread.php?tid=121564)
Read from file -
pagie1111 - 17.01.2010
I am working on a private script, I need to know how to load from a file, a string.
the files set out will be like this:
[code=file]
0 Cadet
1 Agent
2 Special Agent
[/code]
I want to know is it possible to search for the number, then get the string after it. So if I would want to get Agent. I'd search for 1 but how do I rip Agent from the file and place it into a string?
Thanks