|
![](/i/fill.gif) |
Okay, I've probably made another stupid mistake that I'll figure out fifteen
minutes after I post this, but at the moment I am utterly baffled and
clueless.
I'm trying to read from a file that looks like this:
//----
<3.630000,6.150000>,
<2.590000,5.280000>,
<1.880000,3.690000>,
<2.400000,1.720000>,
<3.370000,1.050000>,
<4.850000,0.690000>,
<6.370000,0.880000>,
<7.490001,1.920000>,
<7.410001,2.700000>,
<6.860000,3.320000>,
<6.170000,3.080000>,
<5.330000,3.680000>,
<5.120000,4.530000>,
<5.620000,4.950000>
//-----
// I wound up with, in part, the following code and I get an error saying:
// "Parse error: Expected 'Undeclared identifier', uv vector found instead"
#declare Rv = array[210]
#declare cnt = 1;
#fopen SplnFile Fname read
// -- #while (cnt < 210) <--- this was commented out to check problem
#if (defined(SplnFile))
#read (SplnFile, tempz) // this part works
#declare Rv[0] = tempz;
#declare cnt = cnt + 1;
//#end
#end
#read (SplnFile, shit)
#declare Rv[1] = shit;
text
{ ttf "crystal.ttf", vstr(2, Rv[0], ", ", 0, 5), 0.02, 0 //
texture { pigment {rgb 1} finish {ambient 1} }
scale y*0.7
translate z*3.2
translate x*-3.2
}
text
{ ttf "crystal.ttf", vstr(2, Rv[1], ", ", 0, 5), 0.02, 0 //
texture { pigment {rgb 1} finish {ambient 1} }
scale y*0.7
translate z*3.2
translate x*-3.2
translate y*3
}
//---- > failure happens when I try to read into the array as here:
#while (defined(SplnFile))
#read (SplnFile, Rv[cnt-1]) //*<-- fail point, read into an array fails
#declare cnt = cnt + 1; // why must it be undeclared?
// how do I fix it so the #while statement
#end // reads it?
#fclose SplnFile
//=====================
If anyone can figure out what I've done wrong -- or is it some weird bug --
let me know.
Post a reply to this message
|
![](/i/fill.gif) |