Message 1 of 10
Custom Attributes code errors
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
This is probably a very basic question and I am doing something basic wrong. Sorry if its a stupid question.
I am trying to add a custom attribute to a sphere. I am using code from the MaxScript help. If I create a sphere and call it sphere01 then put the following code in the MaxScript listener from the Help it doesn't work
weaponDataCA = attributes weaponData
(
parameters main rollout:params
(
hitPoints type:#float ui:hits default:10
cost type:#float ui:cost default:100
sound type:#string
)
rollout params "Weapon Parameters"
(
spinner hits "Hit Points" type:#float
spinner cost "Cost" type:#float
dropdownlist sound_dd "Sound" items:#("boom", "sparkle", "zap", "fizzle")
)
)
I get the following error "-- Syntax error: at ), expected <factor>
-- In line: )"
If I put in the same code but put the following line at the end
custAttributes.add $sphere01 weaponDataCA
I get the following error
-- Type error: custAttributes.add requires MSCustAttribDef, got: undefined
I have been searching the help and the web to try and find an answer to this problem.
3ds Max design 2011
I am trying to add a custom attribute to a sphere. I am using code from the MaxScript help. If I create a sphere and call it sphere01 then put the following code in the MaxScript listener from the Help it doesn't work
weaponDataCA = attributes weaponData
(
parameters main rollout:params
(
hitPoints type:#float ui:hits default:10
cost type:#float ui:cost default:100
sound type:#string
)
rollout params "Weapon Parameters"
(
spinner hits "Hit Points" type:#float
spinner cost "Cost" type:#float
dropdownlist sound_dd "Sound" items:#("boom", "sparkle", "zap", "fizzle")
)
)
I get the following error "-- Syntax error: at ), expected <factor>
-- In line: )"
If I put in the same code but put the following line at the end
custAttributes.add $sphere01 weaponDataCA
I get the following error
-- Type error: custAttributes.add requires MSCustAttribDef, got: undefined
I have been searching the help and the web to try and find an answer to this problem.
3ds Max design 2011
