POV-Ray : Newsgroups : povray.newusers : Error in golds.inc of version 3.5 Server Time
4 Sep 2024 18:14:46 EDT (-0400)
  Error in golds.inc of version 3.5 (Message 1 to 5 of 5)  
From: Daohang Sha
Subject: Error in golds.inc of version 3.5
Date: 15 Aug 2002 12:20:55
Message: <3d5bd4e7@news.povray.org>
Hi there,

I am using version 3.5. There is always an error with golds.inc when I
included it in my code. The error is

#declare CVect1 = GoldBase - <----ERROR
Parse Error: Expected 'object or directive', - found instead

The code in golds.inc is following

#declare GoldBase = <1.00, 0.875, 0.575>;
#declare CVect1 = GoldBase - <0.00, 0.20, 0.40>;

I found golds.inc is still version 3.1. Anyone who knows if there is an
version 3.5 for golds.inc or how to correct the code of V3.1 to V3.5.

Thanks

D.S.


Post a reply to this message

From: Tom Melly
Subject: Re: Error in golds.inc of version 3.5
Date: 15 Aug 2002 12:34:01
Message: <3d5bd7f9@news.povray.org>
"Daohang Sha" <dhs### [at] hotmailcom> wrote in message
news:3d5bd4e7@news.povray.org...
> Hi there,
>
> I am using version 3.5. There is always an error with golds.inc when I
> included it in my code. The error is
>
> #declare CVect1 = GoldBase - <----ERROR
> Parse Error: Expected 'object or directive', - found instead
>

Hmm, no problem here - how are you using it? It should be something like this:

#include "golds.inc"

sphere{0,1 texture{T_Gold_1A}}


Post a reply to this message

From: Christopher James Huff
Subject: Re: Error in golds.inc of version 3.5
Date: 15 Aug 2002 13:25:06
Message: <chrishuff-C15854.12115815082002@netplex.aussie.org>
In article <3d5bd4e7@news.povray.org>,
 "Daohang Sha" <dhs### [at] hotmailcom> wrote:

> I am using version 3.5. There is always an error with golds.inc when I
> included it in my code. The error is

That code is fine, it shouldn't make an error. And it doesn't make an 
error on my system, how are you using it?


> I found golds.inc is still version 3.1. Anyone who knows if there is an
> version 3.5 for golds.inc or how to correct the code of V3.1 to V3.5.

The code doesn't need to be corrected, POV 3.5 can handle it fine. That 
is the purpose of the #version directive, to let POV know what language 
version to parse.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Daohang Sha
Subject: Re: Error in golds.inc of version 3.5
Date: 15 Aug 2002 14:07:16
Message: <3d5bedd4$1@news.povray.org>
"Tom Melly" <tom### [at] tomandlucouk> wrote in message
news:3d5bd7f9@news.povray.org...
> "Daohang Sha" <dhs### [at] hotmailcom> wrote in message
> news:3d5bd4e7@news.povray.org...
> > Hi there,
> >
> > I am using version 3.5. There is always an error with golds.inc when I
> > included it in my code. The error is
> >
> > #declare CVect1 = GoldBase - <----ERROR
> > Parse Error: Expected 'object or directive', - found instead
> >
>
> Hmm, no problem here - how are you using it? It should be something like
this:
>
> #include "golds.inc"
>
> sphere{0,1 texture{T_Gold_1A}}
>
>

I dowload "Chairs" from
http://www.povworld.org/objects/cat/Furniture/Chairs/. I just run test.pov.
The error occured. I don't know why.

The following is test.pov

//-----------------------------------------------------
#include "colors.inc"
#include "chairs.inc"

#version 1.0

object{BUEROHOCKER translate<-400,0,0>}
object{BUEROSTUHL  translate< 400,0,0>}

camera {
  location <3000,1600,0>
  look_at <0,400,0>
  rotate <0,225,0>
  angle 30
}
plane{<0,1,0>,0 texture{color Gray50}}
light_source { <-3500,2000,500> color White}
light_source { <-2500,2500,500> color White}
light_source { < 1000,2000,500> color White}
//------------EOF---EOF---EOF--------------------------------------------

// Chairs.inc

//**************************************************************************
*
// Two different types of office chairs.
//
***************************************************************************
// Objects provided by this file are:
// moebelrolle
// rollenkreuz
// BUEROHOCKER
// BUEROSTUHL
//
// Textures provided by this file are:
// black_plastic
// turquois_plastic
//
***************************************************************************
// Scale: 1 millimeter per POV unit.
//
***************************************************************************
// *               Man### [at] munichnetsurfde  (1998)
*
// *                     Feel free to use this file.
*
//
***************************************************************************
#declare moebel = version;

#version 1.0
#include "metals.inc"

//##########################################################################
##

an
// Bolzen an (0,60,0), beliebig rotierbar um z-Achse.
//--------------------------------------------------------------------------
--
#declare black_plastic =
texture {
  pigment { color red 0.3 green 0.3 blue 0.3}
  normal { bumps 0.5 scale 0.3 }
  finish { phong 1 }
}
#declare turquois_plastic =
texture {
  pigment { color red 0.3 green 0.7 blue 0.7}
  normal { bumps 0.2 scale 0.15 }
  finish { phong 1 }
}
//--------------------------------------------------------------------------
--
#declare moebelrolle =
union {
  cylinder {<25,25, 25>,<25,25, 5>, 25}
  cylinder {<25,25,-25>,<25,25,-5>, 25}
  cylinder {<25,25,-20>,<25,25,20>,  5}
  difference {
    cylinder {<25,25,25>,<25,25,-25>,30}
    cylinder {<25,25,26>,<25,25,-26>,27}
    plane {<0,1,0> 25 }
  }
  difference {
    cylinder {<0,25,0>,<0,55,0>,25}
    cylinder {<25,25,26>,<25,25,-26>,27}
    plane {<0,1,0> 25 }
  }
  cylinder {<0,55,0>,<0,60,0>,25}
}
//--------------------------------------------------------------------------
--
#declare rollenkreuz =
union {
  difference {
    union {
      sphere { <300,70,0>,30 }
      cylinder { <0,70,0>,<300,70,0>,30 }
    }
    plane {<0,1,0>, 60}
  }
  object {moebelrolle rotate <0,60,0> translate <300,0,0>}
}
//--------------------------------------------------------------------------
--
#declare BUEROHOCKER =
union {
  object { rollenkreuz texture {black_plastic}}
  object { rollenkreuz rotate <0, 72,0> texture {black_plastic}}
  object { rollenkreuz rotate <0,144,0> texture {black_plastic}}
  object { rollenkreuz rotate <0,216,0> texture {black_plastic}}
  object { rollenkreuz rotate <0,288,0> texture {black_plastic}}
  cone { <0,70,0>,60,<0,110,0>,50 texture {black_plastic}}
  cone { <0,70,0>,45,<0,240,0>,35 texture {black_plastic}}
  cylinder { <0,240,0>,<0,400,0>,20 texture {T_Chrome_5A}}
  // Sitzfl"che:
  cone { <0,400,0>,40,<0,450,0>,230 texture {black_plastic}}
  torus{ 200,30 translate <0,450,0> texture {black_plastic}}
  torus{ 200,28 translate <0,470,0> texture {turquois_plastic}}
  cylinder {<0,470,0>,<0,498,0>,200 texture {turquois_plastic}}
}
//--------------------------------------------------------------------------
--
#declare BUEROSTUHL =
union {
  object { BUEROHOCKER }

  cone { <280,700,0>,40,<260,700,0>,150 texture {black_plastic}}
  torus{ 150,30 rotate <0,0,90> translate <230,700,0> texture
{black_plastic}}
  torus{ 150,28 rotate <0,0,90> translate <210,700,0> texture
{turquois_plastic}}
  cylinder {<210,700,0>,<182,700,0>,150 texture {turquois_plastic}}
  difference{
    torus{ 50,8 rotate <0,0,90> translate <285,700,0> }
    plane{ <0,1,0> 700 }
    texture {T_Chrome_5A}
  }
  cylinder{ <285,700, 50>,<285,480, 50>,8 texture {T_Chrome_5A}}
  cylinder{ <285,700,-50>,<285,480,-50>,8 texture {T_Chrome_5A}}
  difference{
    torus{ 50,8 rotate <90,0,0> translate <235,480,50> }
    plane{ <0,-1,0>,-480 }
    plane{ <1,0,0>,235 }
    texture {T_Chrome_5A}
  }
  difference{
    torus{ 50,8 rotate <90,0,0> translate <235,480,-50> }
    plane{ <0,-1,0>,-480 }
    plane{ <1,0,0>,235 }
    texture {T_Chrome_5A}
  }
  cylinder{ <235,430, 50>,<0,430, 50>,8 texture {T_Chrome_5A}}
  cylinder{ <235,430,-50>,<0,430,-50>,8 texture {T_Chrome_5A}}
}
//**************************************************************************
//*** EOF *** EOF *** EOF *** EOF *** EOF *** EOF *** EOF *** EOF *** EOF **
//**************************************************************************


Post a reply to this message

From: TinCanMan
Subject: Re: Error in golds.inc of version 3.5
Date: 15 Aug 2002 14:35:51
Message: <3d5bf487$1@news.povray.org>
There's your problem:

> #version 1.0
> #include "metals.inc"

change that to:

#version 3.5

and you should be fine.
The parser has got set to version 1 before calling metals.inc (and
golds.inc) and I suppose v1 did not support this syntax.

-tgq


Post a reply to this message

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