|
|
hi,
i get this error but i am unable to understand why.
everything seems good...
File Context (5 lines):
#local a = 1/sqrt(2.0);
#local i = 0;
#while(i<6)
p[i].x =
Parse Error: All #declares of float, vector, and color require
semi-colon ';' at end if the language version is set to
3.5 or higher. Either add the semi-colon or set the language version to
3.1 or lower.
source code :
#macro CreateNSphere (iterationNumber)
#local p = array[6];
#local p[0] = < 0, 0, 1>;
#local p[1] = < 0, 0,-1>;
#local p[2] = <-1,-1, 0>;
#local p[3] = < 1,-1, 0>;
#local p[4] = < 1, 1, 0>;
#local p[5] = <-1, 1, 0>;
// --- Create the level 0 object
#local a = 1/sqrt(2.0);
#local i = 0;
#while(i<6)
p[i].x = a*p[i].x;
p[i].y = a*p[i].y;
#local i=i+1;
#end
#declare facettes[0] = triangle { p[0], p[3], p[4] };
...
...
and this macro is called with this line :
#declare fCreated = CreateNSphere(0);
nothing too complicated :(((
thanks
--
klp
Post a reply to this message
|
|
|
|
> Jim Holsenback<jho### [at] povrayorg> wrote:
>> On 11/14/2010 07:05 AM, kurtz le pirate wrote:
>>> p[i].x = a*p[i].x;
>>> p[i].y = a*p[i].y;
>>
>> forgot something?
>
> #declare or #local I think...
>
> Stephen S
>
>
#local if you only use the array inside that macro.
#declare if you need your array outside the macro, of the array is first
declared outside the macro.
Alain
Post a reply to this message
|
|
|
|
In article <web.4cdfe0bb48b0137b3cc273c80@news.povray.org>,
"StephenS" <nomail@nomail> wrote:
> Jim Holsenback <jho### [at] povrayorg> wrote:
> > On 11/14/2010 07:05 AM, kurtz le pirate wrote:
> > > p[i].x = a*p[i].x;
> > > p[i].y = a*p[i].y;
> >
> > forgot something?
>
> #declare or #local I think...
yes, you're right. it's too obvious :((
thanks
--
klp
Post a reply to this message
|
|