File read
After working for three months with 3dGamestudio I finally managed to make a nice game, however I’m still have trouble with a few very basic routines such as reading numbers from a file and store them in an array.
When I run the following lines:
var fhandle;
STRING* test_str;
function main()
{
video_mode = 7;
screen_color.blue = 150;
fhandle = file_open_read("test.txt");
file_str_read(fhandle,test_str);
file_close(fhandle);
}
I get the error: “invalid pointer or handle in a function”. I didn’t come up with this code myself but got it from the help file, it does not work however. Is this C script instead of Lite C? If this is solved, the next step would be to put the numbers in an array. Who can help me with this little fileread problem?