|
|
I am having a hard time getting
#fopen/#read in version 3.1a, MS-DOS,
to work like I expect.
Can anybody take the time to tell me
what is wrong with the following?
My scene file looks like this:
==============================
#declare R0=4;
#declare n=0;
#fopen PathFile "8_2_11a.dat" read
union{
#while (defined(PathFile))
#read (PathFile, xx, yy, zz)
sphere{<xx,yy,zz>,R0}
#declare n=n+1;
#end
texture{Path0_tex}
}
#fclose(PathFile)
==================================
the file 8_2_11.dat looks like this:
=======================================
33.233795,-89.718941,32.003906,
69.594879,7.195656,-8.293076,
-50.495758,101.845917,-35.317207,
-80.023605,68.077423,-19.941116,
-5.417503,16.675690,-6.008537,
8.868011,30.237213,-12.376640,
2.900688,23.989487,-88.818932,
60.252716,79.018677,-35.281281,
24.128769,107.299164,-43.336853,
6.070969,89.397400,-34.994446,
12.038376,95.645020,41.448578,
-20.985031,62.907074,56.705780,
-32.920090,50.411514,-96.181236,
-86.662827,-2.535072,7.846359
=================================
I am consistently getting this error message
from POVRay (3.1a, MSDOS):
=========================
#while
(defined(PathFile))
#read
(PathFile,xx20
33.233795,yy,
<----ERROR
8_2_11a.dat:2: error: float, vector, or string literal expected
but , found instead.
=======================
Post a reply to this message
|
|
|
|
david sharp schrieb in Nachricht <36D### [at] interportnet>...
>I am having a hard time getting
>#fopen/#read in version 3.1a, MS-DOS,
>to work like I expect.
[...snip...]
>-86.662827,-2.535072,7.846359
>=================================
>
>I am consistently getting this error message
>from POVRay (3.1a, MSDOS):
><----ERROR
> 8_2_11a.dat:2: error: float, vector, or string literal expected
> but , found instead.
POV-Ray is propably right. It propably expects to see values which are not
separated by commas in your .dat file. I haven't tried this, but could this
be the matter?
--
Rudy Velthuis
Post a reply to this message
|
|
|
|
Rudy Velthuis wrote:
> [...snip...]
>
> >-86.662827,-2.535072,7.846359
> >=================================
> >
> >I am consistently getting this error message
> >from POVRay (3.1a, MSDOS):
>
> ><----ERROR
> > 8_2_11a.dat:2: error: float, vector, or string literal expected
> > but , found instead.
>
> POV-Ray is propably right. It propably expects to see values which are
> not separated by commas in your .dat file. I haven't tried this, but
> could this be the matter?
i have tried replacing the commas with spaces and, amazingly
(ironically?) getting the same error message. Anyway, the way
i read the docs, they specifically say fields in the data
should be separated by commas.
Post a reply to this message
|
|