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 / Generating continuous cubes error?

Author
Message
Beyond the Humans Knowledge
15
Years of Service
User Offline
Joined: 27th Oct 2010
Location:
Posted: 16th Jun 2011 11:46
How can i generate cubes side by side with the script automatically renaming each cube number?

Here is my string

It gives me an error, object already exist on line 5.

onhcet d(-_-)b techno
=PRoF=
23
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 16th Jun 2011 13:03
Well, what your code does is makes 10 cubes (1 to 10) and then updates the screen. Then it hits the loop command and whooshes back to the do command where it tries to make box 1 again, only this time it already exists, and thats where your error is coming from.

Maybe the for-next loop would be best suited to be outside the main loop?

e.g.



WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 16th Jun 2011 14:28
Also what you are creating are all in the same place. if in your for loop you add move object left p,p*10 you will be able to see all of the cubes created...

Warning! May contain Nuts!
Beyond the Humans Knowledge
15
Years of Service
User Offline
Joined: 27th Oct 2010
Location:
Posted: 16th Jun 2011 22:41
thank you so much! I feel so stupid because it was just a simple problem.

onhcet d(-_-)b techno

Login to post a reply

Server time is: 2026-07-10 22:55:00
Your offset time is: 2026-07-10 22:55:00