PDA

View Full Version : simple error but frustrating!!


SandeepMaithani
06-04-2007, 01:46 PM
Hi Freinds

Just started learning maxscript but got stuck at this basic problem..everything seemed fine and worked but suddenly i started getting this errror..have a look at the image..

i know this is simple but pls guide me..

regards
sandy

Pjanssen
06-04-2007, 01:56 PM
That's a strange error. It should work, it does here (max 9).
Have you tried restarting max?

SandeepMaithani
06-04-2007, 02:26 PM
i too am on max 9 SP1....i restarted max ....my pc as well...nothing works

its crazy...not a good thing to encounter whn u have just started..

regds

sandy

3rd Dimentia
06-04-2007, 02:44 PM
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-04-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-04-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-05-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-05-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-05-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-06-2007, 12:59 AM
I believe numpad Enter should only execute a single line of code. Much like hitting Shift + Enter

shibumenon
06-06-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.

"CTRL E" or File/EvaluateAll compiles everything in your script editor.

To my shock, the script is working on both the things now....



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-04-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-04-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.