POV-Ray : Newsgroups : povray.newusers : Parse Error: Expected 'texture', texture identifier found instead : Re: Parse Error: Expected 'texture', texture identifier found instead Server Time
29 Jul 2024 08:19:57 EDT (-0400)
  Re: Parse Error: Expected 'texture', texture identifier found instead  
From: Tom York
Date: 23 Apr 2006 21:40:01
Message: <web.444c2b4e10f514d47d55e4a40@news.povray.org>
"SmashManiac" <nomail@nomail> wrote:
> Is it possible to use an array of textures in POV-Ray? I've can get working
> integer arrays and vector arrays, but not texture arrays. They can be
> declared,
> but they don't seem to work correctly because I get...
> ---
> Parse Error: Expected 'texture', texture identifier found instead

In this case the error message is quite useful. You must enclose the
"textures[i]" variable in your mesh2 with a texture block, like

texture { textures[i] }

The error message says that POV needs the variable "textures[i]" to be a
texture (eg texture { MyTextureIdentifier }), but textures[i] is just a
label/name for a texture, like MyTexture here:

#declare MyTexture = texture { ... }

If I then do

sphere {
  <0,0,0>, 1
  MyTexture
}

POV will fail with a similar sort of error. Putting MyTexture in a texture
block will fix it. The same solution applies to your code.


Post a reply to this message

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