Community
3ds Max Programming
Welcome to Autodesk’s 3ds Max Forums. Share your knowledge, ask questions, and explore popular 3ds Max SDK, Maxscript and Python topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Maxscript Rollout Creator Error Max2012

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Anonymous
1152 Views, 2 Replies

Maxscript Rollout Creator Error Max2012

roll = rolloutCreator "Attributes_roll" "Attributes"
roll.begin() roll.addControl #dropdownlist #attrType_drop "Type" paramStr:"pos:[42,34] width:80" roll.addHandler #attrType_drop #selected paramStr:"indexNum" codeStr:"pass()" filter:on addRollout (roll.end()) addAttrsWindow rolledUp:false border:true


>> MAXScript Rollout Handler Exception:
-- Syntax error: at (, expected do
--  In line:     ( <<

 I have been trying to dynamically create my dialogs for awhile now with a fair bit of success. The first major hurdle I have come across is the above code with error. I am trying to create a dropdownlist and then add a handler to it so whenever the selected item is changed it runs a bit of code. Please let it be known that pass() is not my code, I put it in there as a placeholder because the string for my actual code is quite long. And with pass() in there it will still raise the same error as my real code would. I believe that it may have something to do with how its creating the definition from the string when passing it to the addRollout command. Somehow the definition string is not being written properly and its expecting a do in there somewhere and just isn't getting it. Has anyone else ran into this problem with the rollout creator? Thanks

 

Matt

2 REPLIES 2
Message 2 of 3
Swordslayer
in reply to: Anonymous

Since 3ds Max 2012 you need to add an extra space to the parameter string, before the spaces were added automatically. Now it concatenates indexNum with do so it returns an error saying that instead of the expected do, open parenthesis was encountered. Just change it to paramStr:"indexNum "

Message 3 of 3
Anonymous
in reply to: Anonymous

That did it, working perfectly now. Thank you very much for your answer to my question. Cheers!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report