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 / deleting objects causes EXE to stop running ?

Author
Message
simonuk74
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location:
Posted: 27th Apr 2003 19:05
I have written some code that lets me place an object with the mouse, and delete it with the mouse over it & pressing the delete key.
it DID work last night, and I DID save it, as it was a sod to get working like I wanted it to.

but for some reason now, when I try to delete any object, I have placed, the code exits back to the editor ??

any ideas, has anybody ever encountered anything like this before ?
InSiDeR
23
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Australia
Posted: 27th Apr 2003 19:35
ahh looks liek the masked coder has struck again, sneaking into peoples houses and changing hteir code whilst they sleep.

now you know why lee doesnt sleep... :-s

InSiDeR
Visit the NEW DBPlanet, Click Here
"...Yay i got one strap loose..."
simonuk74
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location:
Posted: 27th Apr 2003 19:38
Hmm, if I find out who did this!! lol

I`m going through it step by step, and its beingh a pain! lol

IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 27th Apr 2003 19:50
Just make sure that *you* save everything before you exit from the editor - sometimes when you close the editor, although it does prompt you to save changes, it doesn't always do so when you answer yes.
simonuk74
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location:
Posted: 27th Apr 2003 19:58
heres the code I`m using :

EX & EY are co-ordinates of the mouse, on a matrix, `o` is the object number
The `sel(*,*)` array is for use in displaying whats where, elsewhere in the code

the `object(*,*,*,*)` array is used for storing the objects X&Y&Z co-ordinate, the last element in the array is for : 1= object number ( how I retrieve the number of the object, by working out where the mouse is on the matrix, and 2= is for if the object exist or not.

I`m sure theres NOTHING wrong with it, and I have not changed any other code ( like I found out last time I had a problem! )


but it exits my EXE when I delete an object! ?

simonuk74
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location:
Posted: 27th Apr 2003 20:00
IanM,
I can be sure I did save, about 10 times, as it took ages to get it right!, also, the code is fairley different to how it was before I got it to work, so I know its the save code.
I think I have unfortuanltey found a prob in DB, maybe with my pc alone, I`m not sure ?

indi
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 28th Apr 2003 07:39
function remove_box(EX,EY)
if object(EX,1,EY,2)=1
delete object object(EX,1,EY,1)
object(EX,1,EY,2)=0
endif
endfunction

shouldnt this line [if object(EX,1,EY,2)=1]

be if object exist() blah or is it another function call?

Login to post a reply

Server time is: 2026-07-11 02:35:45
Your offset time is: 2026-07-11 02:35:45