POV-Ray : Newsgroups : povray.newusers : Arrays : Re: Arrays Server Time
28 Jul 2024 22:25:39 EDT (-0400)
  Re: Arrays  
From: Charles C
Date: 13 Jul 2007 15:15:01
Message: <web.4697cedb6bebcd9e74eed8480@news.povray.org>
"OpalPlanet" <ecs### [at] msncom> wrote:

>  #declare M = (n[p]*(my_time - tau[p])); //this is where i get the error
> Parse Error: Attempt to access uninitialized array element.


It's a good old off-by-one error due to the single character: "="   :-)
#while(p <= n_asteroids-1)

You could delete the = here, but it looks like what you'd really want to do
is add it to your other loops.  I normally leave the "=" and "-1" off, and
just use "<"   like #while (whatever < n_asteroids)

Charles


Post a reply to this message

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