hello I started maxscript on MAX 2024 a little while ago and I wanted to create my bones chain from point
and I did but there is a problem in my code
when , in the index forloop I told him to choose the second information from my array he answer me with an error that I don’t understand ( pos is undefined , and he still applies the code haha )
for i = 1 to bar.count do
(
boneA = boneSys.createBone bar[i].pos bar[(i)+1].pos [1,0,0]
)
on createButtonBones pressed do
bonetest POS_BODY
)
– Créer la fenêtreb
createDialog myRollout 300 60
does anyone have a solution and any advice on how to save me from having to deal with these kinds of little problems, which for me are not little problems haha.
you try to get the second position from the next item in the array, but at the end of the loop, there’s nothing there so you get the “pos is undefined” error. A way to fix this is to change the loop from i = 1 to bar.count to i = 1 to bar.count -1
thanks Denis , I’m going to use this template as an example and improve my organization.
I am aware that I still have a long way to go.
but it’s complicated , I find that the 3ds max documentation is not very clear.
and yes Shopeca thank you ! I finally realized it last night too, it’s so stupid that you don’t think about it haha.
and I confess I’m still having trouble deciphering max’s error messages.