|
![](/i/fill.gif) |
hello,
i have this simple macro :
#macro lineEquation (x1,z1,x2,z2)
#local det = x1-x2;
#if(det=0)
#error "\n\n---\nWarning, the system has no unique
solution.\nProgram stop here\n\n"
#else
#local det_a = z1-z2;
#local det_b = (x1*z2)-(z1*x2);
<det_a/det, det_b/det, 0>
#end
#end
i call this with this syntax :
#declare sidesLines[0][0] =
lineEquation(rectangles[0][0].x,rectangles[0][0].z,rectangles[0][1].x,rec
tangles[0][1].z); // with ';' at the end of the line.
arrays "rectangles" and "sidesLines" are defined in this way :
#declare nbRect=1;
#declare rectangles = array[nbRect][4];
#declare sidesLines = array[nbRect][4];
when i run my script, i get this error :
File Context (5 lines):
#else
#local det_a = z1-z2;
#local det_b = (x1*z2)-(z1*x2);
<det_a/det, det_b/det, 0>
#
Parse Error: All #declares of float, vector, and color require
semi-colon ';' at end if the language version is set to
3.5 or higher. Either add the semi-colon or set the language version to
3.1 or lower.
where is my mistake ?
--
klp
Post a reply to this message
|
![](/i/fill.gif) |