Ok, at the moment, I am trying to make an array as a custom attribute.. Only problem, I'm getting the following weird error:
-- Error occurred in anonymous codeblock; filename: J:\Dropbox\ICT312 (1)\scripts\entityAttribs.ms; position: 579; line: 30
-- Unable to convert: #() to type: String
for the following code:
newAttrib = attributes entityAttrib
(
parameters posParam rollout:entParams
(
isStatic type:#boolean ui:isStatic checked:false
castShadow type:#boolean ui:castShadow checked:false
isChild type:#boolean
childeren type:#()
)
rollout entParams "Entity Atributes"
(
checkbox isStatic "Static Entity"
checkbox castShadow "Casts Shadows"
edittext isChildTxt "is child" text:"no"
on isChild changed do
(
if isChild == true then
(
isChildTxt.text = "yes"
)
else
(
isChildTxt.text = "no"
)
)
)
)
custAttributes.add $ newAttrib
--and then use >>
$.baseObject.entityAttrib.castShadow = on
$.baseObject.entityAttrib.isStatic = on
$.baseObject.entityAttrib.isChild = on
$.baseObject.entityAttrib.childeren = on
isProperty $.baseObject #castShadow
isProperty $.baseObject #isStatic
isProperty $.baseObject #isChild
isProperty $.baseObject #childeren
if I follow tutorials on how to make an array inside of just any odd script, not inside of a custom paramater, i.e.
childeren = #()
I get the following error:
-- Error occurred in anonymous codeblock; filename: J:\Dropbox\ICT312 (1)\scripts\entityAttribs.ms; position: 231; line: 8
-- Syntax error: at =, expected name
-- In line: childeren = #
I know it's probably something silly.. But I can't for the life of me understand why my array isn't working inside of a parameters :(
Is there a proper way??
If anyone's curious, the reason why I need an array is because I'm holding children meshes inside of an array (needed for proper extraction of scene data for exporter)
barigazy · 2012-09-10