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 Discussion / Need some help, Object already exists

Author
Message
nb6547
14
Years of Service
User Offline
Joined: 31st Mar 2010
Location:
Posted: 5th Apr 2010 15:10
Hey everyone, I'm new here, as well as to DB. I'm a student and our school just got it, so no one really knows much. I figured it'd be best to come straight here.

I have a bit of code, and when i try to insert the cones, it tells me "Object already exists"

I'm not sure what this means exactly, and the teacher is no help
here's the code im working with



Sorry its a nooby question, but I'd appreciate the help
Thanks!
No Time To Code
15
Years of Service
User Offline
Joined: 22nd Dec 2008
Location:
Posted: 5th Apr 2010 18:29 Edited at: 5th Apr 2010 18:29
Welcome to the forum!

Your character is assigned to object 10:


Then you try and create another object 10 with your loop to create the cones:


Assign your character to an object that is not between 1 and 500 (i.e 501) and you should be OK.

It is not from the benevolence of the butcher, the brewer, or the baker, that we expect our dinner, but from their regard to their own interest. --Adam Smith
Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 5th Apr 2010 20:12 Edited at: 5th Apr 2010 20:13
Welcome To The TGC FORUMS!!!!! WOOO!!!!!!!!!!...........ahem.

you cloud also try



That way you'll use objects 1 thru 500, and ten will still be your player.

(\__/) HHAHAHAHAHAH!
(O.o ) / WORLD DOMINATION!!!!!!!!!!
(> < )
Robert The Robot
17
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 6th Apr 2010 18:34
Quote: "for x = 1 to 500
if x > 10 and x < 10 then"

Actually, that will never produce any cones - is there any number that is >10 and <10 at the same time?

You should use Or :


"I wish I was a spaceman, the fastest guy alive. I'd fly you round the universe, in Fireball XL5..."
Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 6th Apr 2010 18:45
lol, Yeah, Thats what I meant..............

(\__/) HHAHAHAHAHAH!
(O.o ) / WORLD DOMINATION!!!!!!!!!!
(> < )
Robert The Robot
17
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 6th Apr 2010 18:55
We all mkae typos...

"I wish I was a spaceman, the fastest guy alive. I'd fly you round the universe, in Fireball XL5..."
nb6547
14
Years of Service
User Offline
Joined: 31st Mar 2010
Location:
Posted: 7th Apr 2010 19:48
thank you all so very much! I didn't want to sound stupid because i saw you were all really into the code and i was just starting, but i figured it was the best place to go.

thank you again, i'll be sure to come back if i need any more help
Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 7th Apr 2010 22:28
yup. Glad to (somewhat)help.

(\__/) HHAHAHAHAHAH!
(O.o ) / WORLD DOMINATION!!!!!!!!!!
(> < )

Login to post a reply

Server time is: 2024-04-26 09:39:40
Your offset time is: 2024-04-26 09:39:40