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 / Delete object problem

Author
Message
MatinZ
12
Years of Service
User Offline
Joined: 7th Nov 2013
Location:
Posted: 25th Feb 2014 17:29 Edited at: 6th Mar 2014 17:14
Test Post, Ignore

-Mateen
Derek Darkly
14
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 25th Feb 2014 22:07
Hmm, well at first glance, it looks like you're using the wrong command. You want DELETE OBJECT n.

Also, please use code tags when possible.

666GO†O666
wattywatts
17
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 26th Feb 2014 01:12
Quote: "cgfjygjyjyghjg"

WTF?

New sig coming soon..
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 26th Feb 2014 15:39 Edited at: 26th Feb 2014 15:40
Please leave your question visible so the next person who has this problem can learn from it.

29 games
20
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 26th Feb 2014 15:53
Give the OP a break, for all we know he's fallen off his chair, hit the keyboard with his head on the way down and is now in hospital.

chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 26th Feb 2014 16:28
Quote: "WTF?"


Quote: "Give the OP a break, for all we know he's fallen off his chair, hit the keyboard with his head on the way down and is now in hospital."



Knowing that deleting an object is pretty easy, I think this gonna be a problem when we delete an object within the main Do/loop, we'll find an error about the object does not exist. If this is your case, and you want to delete an object , let say when we press Spacekey, you could do something like this:

If object exist(my_obj) then delete object my_obj
if object exist(my_obj) then rotate object my_obj .....or
if object exist(my_obj) then move object my_obj...


In this case the program won't stop if object does not exist when you delete ...of course, we need to add some code to some lines.

I'm not a grumpy grandpa
Gyro44
12
Years of Service
User Offline
Joined: 7th Nov 2013
Location:
Posted: 6th Mar 2014 17:09
It would help if you put some code.

Wobbly wobbly wob
chicken nugget
12
Years of Service
User Offline
Joined: 6th Mar 2014
Location:
Posted: 6th Mar 2014 17:21
I'm sorry that this man is unable to solve his own problems. We will try very hard to make it to his funeral if he happens to pass away...

chicken...
chicken nugget
12
Years of Service
User Offline
Joined: 6th Mar 2014
Location:
Posted: 6th Mar 2014 17:22
use the delete object code to delete an object...
can't you solve this yourself?

chicken...

Login to post a reply

Server time is: 2026-07-06 14:39:55
Your offset time is: 2026-07-06 14:39:55