|
![](/i/fill.gif) |
The #read section in the docs says that a vector identifier used in this way
should be predeclared. You've declared the array, but not initialised the
element you're trying to read into. Try:
#fopen MyFile "myData.txt" read
#local i = 1;
#while (i<2)
#local Vector[i] = <0,0,0>;
#read (MyFile,Vector[i])
#local i = i + 1;
#end
Also note that arrays are zero-based in index, and your code will only attempt
to read 1 vector from the file. You should set i = 0 instead, unless I have
misread your intentions!
Bill
Post a reply to this message
|
![](/i/fill.gif) |