Author Topic: Function Read Line  (Read 1011 times)

0 Members and 1 Guest are viewing this topic.

Offline Rampage_Terranius

  • Major
  • *
  • Posts: 69
  • The Strategist
    • Soldat Noob Servers
Function Read Line
« on: November 18, 2008, 02:34:23 pm »
Okay first of all i just want to say that this is different from the other Read function i made
The other one is designed for loading chunks of data this one is designed for loading lines of data

Script Name: Read Line
Script Description Read A Line Of Data
Author: Rampage_Terranius
Compile Test: Passed
Core Version: 2.6.3
Hosted by: Soldat Central - http://soldatcentral.com/

Full Description:
This version of read acts differently to normal read and more like readini this version will load all the data on the line starting from where you tell it and ends loading when it detects ascii symbol 13, ascii symbol 10 or the end of the file the difference being that it wont leave garbage data behind like readini does and you only need to add the line you want to add

In short it reads a line of data

works like so:

Read(Variable To Read From, Start Load From Here)

For Example coming from a variable called Blah with this data:
PassWord=14bfa6bb14875e45bba028a21ed38046
LastToSaveToFile=Rampage_Terranius At IP 127.0.0.1
Cash=1
Level=2
Experience=3
MaxExperience=4

Read(Blah, 'PassWord=') will return the value '14bfa6bb14875e45bba028a21ed38046'

I have tested this a little and it seems to work but there may be some bugs if you find any let me know



(Size 712 B)
- http://soldatcentral.com/index.php?page=script&f=73 -


** Script hosted by Soldat Central! Please visit the author's script page and Rate this script **

Offline shantec

  • Soldier
  • **
  • Posts: 140
  • Get ANGREH!!
Re: Function Read Line
« Reply #1 on: November 18, 2008, 02:46:20 pm »
Lol dumb guestion:
does it read any text file form.. like ini, txt ect?

Good work here!
Also Known As REIMA


Lol Happles (happy apples)

Offline Rampage_Terranius

  • Major
  • *
  • Posts: 69
  • The Strategist
    • Soldat Noob Servers
Re: Function Read Line
« Reply #2 on: November 18, 2008, 04:26:00 pm »
if its text it will read it i even got it to read data from an unnamed file :D

Offline Rampage_Terranius

  • Major
  • *
  • Posts: 69
  • The Strategist
    • Soldat Noob Servers
Re: Function Read Line
« Reply #3 on: November 20, 2008, 02:59:13 am »
I forgot to cancel out the ascii symbol when it finds it >< i fixed it up now so it correctly works :P