SRL Archive - SRL Archives

ReadFileLine for anyone java, php, or C++ based!


LordGregGreg

2007-07-14 01:34:03

I am helping Here a little bit with making a script updater sort of thing.
(actually, shes doing really good herself, lol, I just tell her how it wont work and piss her off, lol)

It reads a script, makes some changes, and then saves it with a new name.

Well, the SCAR functions are great… but they are lacking a classic, and very handy little method.
READLINE

so, I made one.
Feel free to use it or add it to srl with credit.

function readFileLine(GregFile:Integer):String;//By Greg Hendrickson!
var
s,bigs:String;
begin
while not EndOfFile (GregFile) do
begin
ReadFileString(GregFile,s,1);
bigs:=bigs+s;
if(s=#10) then
begin
result:=bigs;
exit;
end;
writeln(bigs);
end;
end;

n3ss3s

2007-07-18 08:44:56

[KINDERGARTEN] What does # mean? [/KINDERGARTEN]

LordGregGreg

2007-07-18 09:48:29

i dont know, lol, aparently its how you tell scar that you are talking about a byte, instead of an int or soemthing
10 is the ascii code for end line (yes, this may not work so well on a mac or linux)

the scar noob

2007-07-22 14:50:50

From: lordgreggreg
i dont know, lol, aparently its how you tell scar that you are talking about a byte, instead of an int or soemthing
10 is the ascii code for end line (yes, this may not work so well on a mac or linux)


you can run scar on mac?

LordGregGreg

2007-07-22 14:52:39

From: the scar noob
you can run scar on mac?

No no, its just that if i did, then end line stuff would have to be diferent that just a #10

the scar noob

2007-07-22 14:57:27

From: lordgreggreg
No no, its just that if i did, then end line stuff would have to be diferent that just a #10


i know i just wondered that, cause Freddy is planning to make it for linux, maybe he is planning to make it for mac to, that was the thing i didn't knew for sure ;)
i'm not really active last days, we're moving to another house so yea, i got to help :p
btw wich language do you speak?

edit: nvm now i see you live in texas, so i gues you speak english :D
Dang! i need a dutch speaking person atm who knows a lot about scar and srl like Nielsie95 but he's on holiday :mad:

LordGregGreg

2007-07-22 15:01:45

From: the scar noob
i know i just wondered that, cause Freddy is planning to make it for linux, maybe he is planning to make it for mac to, that was the thing i didn't knew for sure ;)
i'm not really active last days, we're moving to another house so yea, i got to help :p
btw wich language do you speak?

edit: nvm now i see you live in texas, so i gues you speak english :D
Dang! i need a dutch speaking person atm who knows a lot about scar and srl like Nielsie95 but he's on holiday :mad:

Yep, sorry, i speak texas, english, a enough spanish to tell of any scum bag trying to sell me drugs.

the scar noob

2007-07-22 15:14:05

From: lordgreggreg
Yep, sorry, i speak texas, english, a enough spanish to tell of any scum bag trying to sell me drugs.


well yea, need someone (preferabaly dutch speaking someone cause of my rather bad english) toa sk something, but w/e you seem to be a nice person :d

n3ss3s

2007-07-24 12:24:22

Lorggreggreg, about your sig, is it true that 2 people have not used search button?
R-R-Really?
:eek:
B B B But I have made a whole tutorial about that. . . .
:( :( :(
*Stares at emptiness with frozen eyes for a moment* :cartman:
:mad: :fiery: :fiery: :fiery:
"T!#3|\/| t0 K!311 S03NM N43B5!! GAME TIME MOTHA FUCKA!!!!"


program New;
var
I: Integer;
var
A: Array of string;
begin
SetArrayLength(A, 5);
A[0] := 'nade';
A[1] := 'ak47';
A[2] := 'windmill shuriken';
A[3] := 'nailgun';
A[4] := 'axe';
for I := 0 to 4 do
begin
Writeln('Pulls out '+A[I]);
end;
end.