I have no idea what the problem might be.
I just typed that same script in to max9 sp2 and max8 sp3 and it worked fine for me in both.

Maybe just start a new script and type it in again.

fabman

06 June 2007, 04:07 PM

The only idea it comes to my mind it's that you defined a persistent variable named myrollout before, and it's still undefined, or... there's a bug on your 3ds max.
Try to execute step by step the script ( with shift+enter ), to see exactly where it fails, when you define the rollout or when you create de dialog.

thatoneguy

06 June 2007, 08:27 PM

Where are you trying to declare the rollout? I think rollouts have to be global and can't be defined within an "if" statement for instance. Might be wrong.

SandeepMaithani

06 June 2007, 09:16 AM

Thnaks for being ther guys..
whn i hit numpad enter key...the problem comes(why so??)
But when i press ctrl+E
I get the dialog.....
any ideas??

best regards

Sandy

ypuech

06 June 2007, 10:06 AM

Thnaks for being ther guys..
whn i hit numpad enter key...the problem comes(why so??)
But when i press ctrl+E
I get the dialog.....
any ideas??

best regards

Sandy
In fact when you hit "Entr" of the numpad and Ctrl+E, the way the script is evaluated isn't the same. With numpad enter, the whole script isn't evaluated. With Ctrl+E, the entire script is evaluated.

SandeepMaithani

06 June 2007, 11:59 AM

if i put my cursor in the last and then hit numpad enetr, wont it evaluate the whole script?
To my shock, the script is working on both the things now....

regards

sandy

thatoneguy

06 June 2007, 12:59 AM

I believe numpad Enter should only execute a single line of code. Much like hitting Shift + Enter

shibumenon

06 June 2007, 12:01 PM

if i put my cursor in the last and then hit numpad enetr, wont it evaluate the whole script?

NumberPad Enter can be used in two ways:
1) To evaluate the single line of script that the cursor is on.
2) To evaluate a selection of lines
You can use Num Pad Enter in both, the script editor as well as in maxscript Listener.

This is because the first time you pressed CTRL E, you evaluated the entire code, which means you evaluated the rollout definition as well. This definitation remains in memory till the time you exit max. So, once the rollout is defined, you can create it anytime by evaluating only : createdialog myrollout

SandeepMaithani

07 July 2007, 07:31 AM

Hi Shibu
Good to see u here!!!
I think we met at PAM's child's naming ceremony party at meera road!!
Hows u buddy??

Ya..this is kinda clear to me now...just entered thhis amazing world of maxscript...

so long

Cheers

sandy

CGTalk Moderation

07 July 2007, 07:31 AM

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.

Follow Us On:

The CGSociety

The CGSociety is the most respected and accessible global organization for creative digital artists. The CGS supports artists at every level by offering a range of services to connect, inform, educate and promote digital artists worldwide. More about us on TheArtSociety.com