ent_bonehandle - invalid function arguments

Posted By: Superku

ent_bonehandle - invalid function arguments - 01/26/16 11:31

Code:
long MFBoneHandle = ent_bonehandle(my,"Bone2",0);
printf("%d",(int)MFBoneHandle);


I'm getting an "invalid function arguments" error, after that it prints "3" to the screen which I guess is the correct handle (as I can use it to reset a bone's position).
When I use a regular string it works without error message:

Code:
str_cpy(str_tmp,"Bone2");
long MFBoneHandle = ent_bonehandle(my,str_tmp,0);
printf("%d %s",(int)MFBoneHandle,_chr(str_tmp));



Nothing of importance and it may even be my misunderstanding but I thought I should post it here.
Posted By: jcl

Re: ent_bonehandle - invalid function arguments - 01/26/16 14:43

Nein, das sollte beides äquivalent sein. Ich bekomme hier auch keinen Fehler, wenn ich den Namen direkt übergebe.

Passiert bei Ihnen das Problem auch mit einem Minimal-Skript, das nur die obigen Zeilen ausführt?
Posted By: Superku

Re: ent_bonehandle - invalid function arguments - 01/26/16 14:56

It does: http://superku.de/bonehandle.zip
Posted By: jcl

Re: ent_bonehandle - invalid function arguments - 01/26/16 15:45

Thanks! This was indeed a bug.

ent_bonehandle writes the bone name into the string when only the index is given. This should not happen here since the name is given, but for some reason the function still checks if the name is writeable. This will be fixed in the next update.
Posted By: Superku

Re: ent_bonehandle - invalid function arguments - 01/26/16 16:11

Thanks!
© 2024 lite-C Forums