Maxscript Beginner questions

Maxscript Beginner questions

Anonymous
Not applicable
2,130 Views
1 Reply
Message 1 of 2

Maxscript Beginner questions

Anonymous
Not applicable
Hello everyone, I'm new to Maxscript and have some (hopefully) easy questions that need answering.

1. I was following a tutorial online (http://knol.google.com/k/introduction-to-maxscript#) and used this code:

macroScript HelloWorld category:"DAE"
(
MessageBox "Hello World"
)

The tutorial I was following says I need to drag the script onto the empty toolbar. I created the empty toolbar, but when I tried to drag the script to the empty toolbar (as the tutorial says) I get this error message:

--Compile error: Nested macroScript definitions are not permitted
-- In line: macroScript H

What exactly am I doing wrong?
0 Likes
2,131 Views
1 Reply
Reply (1)
Message 2 of 2

Steve_Curley
Mentor
Mentor
Drag the script Name from the List in the Customise UI dialog to the Toolbar, not the text of the script from the Script Editor.

You can drag text from the editor, but in that case it must not contain a "MacroScript" definition - that will be added automatically (and transparently) so if the text contains the definition you end up with 2 nested definitions of the same thing, the one in the text you copied and the one added by Max, hence the error.

If you haven't already, I would strongly suggest you open up the Maxscript help, Contents tab, and carefully read through the Introduction and the Learning MaxScript topics. They contain important information without which you may struggle to understand how and why things work - and why they sometimes don't.


Max 2016 (SP1/EXT1)
Win7Pro x64 (SP1). i5-3570K @ 4.4GHz, 8Gb Ram, DX11.
nVidia GTX760 (2GB) (Driver 430.86).

0 Likes