#include <acknex.h>
STRING* WordText = "#4000"; //string with space for 4000chars (4000chars is the max length of file_str_read())
STRING* fileString = "test.txt"; //the file
var lineToRead = 3; //the line that should be read
TEXT* Word =
{
layer = 15;
pos_x = 100;
pos_y = 100;
font = "Verdana#15"; //here you forgot a font
strings = 1;
flags = SHADOW | OUTLINE | TRANSLUCENT | SHOW;
alpha = 100;
}
void main() {
video_mode = 8;
video_screen = 2;
var myFile = file_open_read(fileString); //you have to use file_open_READ to read the file
if(myFile == 0) error("Couldn't open the file!");
var i;
for(i=0;i<lineToRead;i++) {
file_str_read(myFile,WordText);
}
file_close(myFile);
str_cpy((Word.pstring)[0], WordText);
}