Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / checklist quantity into variable?

Author
Message
Kiaurutis
15
Years of Service
User Offline
Joined: 19th Jan 2011
Location: Lithuania
Posted: 28th Sep 2012 22:17
I have been trying to add a limb to animated object, and it worked fine, but when I try to store checklist quantity in a variable, so that I can access this limb data later, it just fails... What could be the problem with that? It does occur with simple cube too. Here is the code showing problem:


Join The dark Side! We have cookies
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 28th Sep 2012 23:24


Because DarkBASIC Pro is somewhat gay, you have to actually do this instead:



TheComet

"Why geeks like computers: unzip, strip, touch, finger, grep, mount, fsck, more, yes, fsck, fsck, fsck, umount, sleep." - Unknown
Kiaurutis
15
Years of Service
User Offline
Joined: 19th Jan 2011
Location: Lithuania
Posted: 29th Sep 2012 04:58
Thanks Comet Another hidden niggle... does this problem only occur with variable+checklist or in some other cases too? I haven't noticed any other fails when creating variables this way yet
It is funny that I was searching for problems with add limb command, then accidentally found lots of threads about checklist fails. And now it appears that it is value assertion fail... Debugging is really the hardest part of creating a program

Join The dark Side! We have cookies
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 29th Sep 2012 12:23
My general rule is to only define a variable like that if the value you're assigning to it is constant, i.e.



As soon as you're assigning the return value of a function or a command, you should do it separately. These do not work:



These do:



TheComet

"Why geeks like computers: unzip, strip, touch, finger, grep, mount, fsck, more, yes, fsck, fsck, fsck, umount, sleep." - Unknown

Login to post a reply

Server time is: 2026-07-08 21:13:35
Your offset time is: 2026-07-08 21:13:35