Quote:
WordText = file_str_read(myFile,fileString);
The function file_str_read returns a var with the length of the string that was been found. You can't save a var in a string pointer ... Oo


I don't understand. I was following the manual:
STRING sTest;
...
fhandle = file_open_read("test.txt"); // test.txt contains "this,is,a,test"
file_str_read(fhandle,sTest); // sTest now contains "this"
file_close(fhandle);


Could you explain a bit more? Thanks

Quote:
Then your while loop makes no sense to me. You try to run it three times and read the first three lines one after the other into the string 'fileString' ... Would you like to read the thrid line or what?


Yes, I want to read the third line. I was following this procedure:
var_nsave filehandle;
...
filehandle = file_open_read("myfile.txt");
// file contains: "123456.789 1.414"
temp = file_var_read(filehandle); // now temp == 123456.789
temp = file_var_read(filehandle); // now temp == 1.414
file_close(filehandle);


I was thinking that the loop would get me to the third line. I was using the text to see if it worked. Could you help me with the code?

Quote:
str_cpy((Word.pstring)[1], WordText);
This is the right code to copy a string into a text to show it on the screen. But remeber that your readed Text is in the string 'fileString'


At least I got some part right. I used 'WordText' because when I tried to use 'fileString', I got an error. Even when I tried to copy 'fileString' to another string, I get an error. Can you help a bit more? Thanks