POV-Ray : Newsgroups : povray.newusers : weird macro error : weird macro error Server Time
29 Jul 2024 04:29:22 EDT (-0400)
  weird macro error  
From: CdeathJd
Date: 18 Sep 2006 19:55:00
Message: <web.450f319fe8b4b0ebe2e0912a0@news.povray.org>
Hi, can someone please explain where this code is going wrong, it gives the
error message "PARSE ERROR: EXPECTED `STRING`, END OF FILE FOUND INSTEAD"

==============================================================================

#macro Save_Fires()
#declare index=0;

  #fopen IFV_File "Fires.inc" write
  #write ( IFV_File, "// This is a generated file which " )
  #write ( IFV_File, "can probably be deleted without too much harm.n" )
  #write ( IFV_File, concat("#declare fire_array=array[1001][9]n" )

#while (index<MAX_FIRE)

  #write ( IFV_File, concat(  "#declare fire_array[",str(index,0,0),"][0]=",
str(fire_array[index] [0],0,3),";n" ))
  #write ( IFV_File, concat(  "#declare fire_array[",str(index,0,0),"][1]=",
str(fire_array[index] [1],0,3),";n" ))
  #write ( IFV_File, concat(  "#declare fire_array[",str(index,0,0),"][2]=",
str(fire_array[index] [2],0,3),";n" ))
  #write ( IFV_File, concat(  "#declare fire_array[",str(index,0,0),"][3]=",
str(fire_array[index] [3],0,3),";n" ))
  #write ( IFV_File, concat(  "#declare fire_array[",str(index,0,0),"][4]=",
str(fire_array[index] [4],0,3),";n" ))
  #write ( IFV_File, concat(  "#declare fire_array[",str(index,0,0),"][5]=",
str(fire_array[index] [5],0,3),";n" ))
  #write ( IFV_File, concat(  "#declare fire_array[",str(index,0,0),"][6]=",
str(fire_array[index] [6],0,3),";n" ))
  #write ( IFV_File, concat(  "#declare fire_array[",str(index,0,0),"][7]=",
str(fire_array[index] [7],0,3),";n" ))
  #write ( IFV_File, concat(  "#declare fire_array[",str(index,0,0),"][8]=",
str(fire_array[index] [8],0,3),";n" ))

  #declare index=index+1;

#end
  #fclose IFV_File
#end

==============================================================================

FYI it highlights the second to last line when it gives this message
(#fclose etc etc)

After this line is a lot more code, and there is more after the macro is
called, so why is it given this error?


Post a reply to this message

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