Re: Error - cant get around! Expected ;
Posted by
Aryeh Weiss on
Jun 29, 2011; 12:31pm
URL: http://imagej.273.s1.nabble.com/Error-cant-get-around-Expected-tp3684050p3684064.html
On 6/29/11 2:28 PM, flettster wrote:
> The macro works fine without the following code in it. This is lines 10-22.
>
> the error message refers to line 132!
>
>
>
> Dialog.create("pre/post");
> prepost = newArray("Pre", "Post", "5", "10", "15","Other");
> Dialog.addChoice("Time post contrast", prepost);
> Dialog.show();
> prepost=Dialog.getChoice();
>
> if (prepost=="Other") {
> Dialog.create("Time");
> Dialog.addMessage("Please enter the Time");
> Dialog.addMessage("(Enter the time relative)");
> Dialog.addString("Number",1);
> Dialog.show();
> prepost = Dialog.getString();
> }
>
>
Your code will work if you add a close parenthesis in your make polygon
command:
makePolygon(x2,y2,x2-(2*(cos(theta-(4*pi/3))*x2)),y2-(2*(sin(theta-(4*pi/3)))*y2),x2-(2*(cos(theta-(3*pi/3))*x2)),y2-(2*(sin(theta-(3*pi/3)))*y2));
In the macro you sent you were missing a ) in the makePolygon (also in
the next one). Probably you cut and pasted, and lost the ).
--aryeh
--
Aryeh Weiss
School of Engineering
Bar Ilan University
Ramat Gan 52900 Israel
Ph: 972-3-5317638
FAX: 972-3-7384051