Notifications
Clear all

[Closed] Struct problem

[font=Verdana][size=2][color=white]I want to make my own Box().
I wrote a script below

aa.name = “ooooooooo”

It doesn’t work.
I don’t get what’s wrong with it.

[/size][/color][/font]

 
 
clearListener()
struct testBox
( 
mybox = box(),
name = mybox.name,
width = mybox.width,
Length = mybox.Length,
Height = mybox.Height
)
aa = testBox() 
aa.name = "ooooooooo"
 

3 Replies

Why are there commas after the lines? Remove them.

1 Reply
(@zeboxx2)
Joined: 11 months ago

Posts: 0

Those commas are supposed to be there; without them, maxscript shouts profanities* at you


-- Syntax error: at name, expected )
--  In line: name =

The code works just fine… but, onetera, if you want to change the name of the actual box generated, you need to use:

aa.mybox.name = "aaaaaaaa"

The .name in your struct has no direct correlation to the name of the object in myBox whatsoever.

ah ok thanks!