You can read whole text by calling File.ReadRawLineBack() in a loop until File.EOF:
Code: ags
It's better to use regular linebreaks ("\n"), because "[" is a non-standard solution used only by AGS, and other programs do not understand it.
In AGS 4.0 we deprecated "[", so it's no longer works as a linebreak.
EDIT: Fixed the code, forgot you also need to add linebreak chars between lines.
String all_text = "";
while (!file.EOF) {
if (!String.IsNullOrEmpty(all_text)) {
all_text = all_text.AppendChar('\n');
}
all_text = all_text.Append(file.ReadRawLineBack());
}
It's better to use regular linebreaks ("\n"), because "[" is a non-standard solution used only by AGS, and other programs do not understand it.
In AGS 4.0 we deprecated "[", so it's no longer works as a linebreak.
EDIT: Fixed the code, forgot you also need to add linebreak chars between lines.