Maxscript struct bug

Maxscript struct bug

trykle
Contributor Contributor
865 Views
1 Reply
Message 1 of 2

Maxscript struct bug

trykle
Contributor
Contributor
struct testDef
(
	info = "no info",

	fn addInfo txt =
	(
		append this.info txt
	)
)


fn getInfo =
(
	t = testDef()
	t.addInfo "add some info contnet."
	
	t2 = testDef()
	t2.info
)
getInfo()
getInfo()
getInfo()

 

--The right result
#Struct:testDef(
  addInfo:<fn>; Public,
  info:<data>; Public)
getInfo()
"no info"
"no info"
"no info"

 

--max 2022
#Struct:testDef(
  addInfo:<fn>; Public,
  info:<data>; Public)
getInfo()
"add some info contnet."
"add some info contnet.add some info contnet."
"add some info contnet.add some info contnet.add some info contnet."
0 Likes
Accepted solutions (1)
866 Views
1 Reply
Reply (1)
Message 2 of 2

ads_decatae
Autodesk
Autodesk
Accepted solution

Thank you for reporting this issue, @trykle ! It has been accepted and our development team will take a look. 



Elena de Catalina
Sr. QA Analyst
Entertainment Creation Products, ECP
0 Likes