PDA

View Full Version : Error while passing an arguement?


ScottyDoesntKnow
04-08-2006, 04:13 PM
Ok this is just a simple punctuation problem im guessing but I dont understand what to do.
Here is the Code
if(`window -exists placeWindow`)
deleteUI placeWindow;

window -t "Quick Object Placer" -menuBar true -rtf 1 placeWindow;
menu -label "File";
menuItem -label "close" closeMI;
formLayout myLayout;
text -label "Nurb Surfaces:" nurbText;
separator -style "out" nurbsSep;
button -label "Sphere" -c createObject("NurbsSphere") nButton1;
formLayout -e
-af nurbText "top" 0
-af nurbText "left" 0
-af nurbText "right" 0

-af nurbsSep "left" 0
-af nurbsSep "right" 0
-ac nurbsSep "top" 0 nurbText

-af nButton1 "left" 0
-ap nButton1 "right" 0 50
-ac nButton1 "top" 0 nurbsSep
myLayout;
showWindow placeWindow;

proc createObject(string $type)
{ }
The problem is that when I execute it replies with a syntax error saying
that there are too many arguements expected 1 found 2.If I take out the quotes then I get invalid use of NurbsSphere.

Stucky
04-08-2006, 04:50 PM
Hi dude. You have to put createObject("NurbsSphere") under parentesis, like:



(createObject("NurbsSphere"))



and that NurbsSphere is refering to the command that creates a nurbs sphere? cause if it is, it is wrong. The command to create a nurbs sphere is:


sphere;



Hope it helps


-S

ScottyDoesntKnow
04-08-2006, 05:31 PM
ah...Thanks. But no the name isnt to create a sphere. THANKS:wavey:

CGTalk Moderation
04-08-2006, 05:31 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.