file_var_read doesnt function?

Posted By: Ness

file_var_read doesnt function? - 03/02/09 22:04

Welli tried the HELP of manual and here is the result:

Click to reveal..
var_nsave filehandle;
var zeitspeicher;

action test
{
player = me;

filehandle = file_open_write("myfile.txt");
file_var_write(filehandle,123);
file_close(filehandle);
filehandle = file_open_read("myfile.txt");
zeitspeicher = file_var_read(filehandle);
zeitspeicher = file_var_read(filehandle);
file_close(filehandle);

}

panel testnew
{
pos_x = 30;
pos_y = 30;
flags=refresh,visible,overlay,d3d;
digits(0,20,5,*,1,zeitspeicher);
}

function main()
{
level_load("testest.wmb");
}


I dont get any value zeitspeicher has everytime 0!
How do it can have zeitspeicher 123??

PS: Subquestion: How can i write string/integer in textfile like this:
test
test 2
...
...
I can do only this:
test test2 ... ...

greetings ness
Posted By: Cowabanga

Re: file_var_read doesnt function? - 03/03/09 12:45

Originally Posted By: Ness
PS: Subquestion: How can i write string/integer in textfile like this:
test
test 2
...
...
I can do only this:
test test2 ... ...


Make it like this:

test/ntest2

And so on... smile
© 2024 lite-C Forums