POV-Ray : Newsgroups : povray.newusers : parse error end of file but #end expected, is my code correct? : Re: parse error end of file but #end expected, is my code correct? Server Time
18 Apr 2024 11:21:35 EDT (-0400)
  Re: parse error end of file but #end expected, is my code correct?  
From: Bald Eagle
Date: 4 Dec 2017 06:35:00
Message: <web.5a25328f1496c9fd5cafe28e0@news.povray.org>
"daisy807" <dri### [at] livecouk> wrote:
> Thank you
> im self teaching myself Pov-RAY finding it very difficult

Well, you're off to a pretty amazing start.
I find it useful to visual pair each opening and closing of a block of code with
another level of indent, plus commenting which #end is which.
It's also helpful when writing blocks of code like that to immediately terminate
the block with the matching ending, and then insert the filler code afterwards -
so every opening always has a matching ending.

#if // if #1
     #if // # if #2
          some code
     #end // end if #2
#end // end if #1

That way I can lock my eyes on the opening, and scroll down until I hit the
close. (I need to start doing this with parentheses too)

I also do this with opening and closing curly braces for unions, textures, etc.

> so sf_roundtrianglepoints are just points i need so im guessing it shouldnt be
> an object
> i put the corrected code you produced onto pov ray and it worked but i cannot
> see the points
>
> altogether i need 6 points

You just need a sphere {} for every point.  Points in POV-Ray aren't visible
objects - even "if they were" - they'd be infinitely small mathematical points
that were invisible anyway  ;)
[back off pedants - you know what I mean! :D  ]

So just make a
#declare Triangle = union {sphere {}  sphere{}  sphere {}}
with very small radii, and that ought to do it.

> really appreciate your help! :)

Sure thing


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.