123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|431|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Blitz -> is the type deleted?

Tue, 10 Apr 2007, 07:43
Paul
Is there any way to check this without crashing the program?

|edit|
I dont think i was clear so i will try again

|edit|

Tue, 10 Apr 2007, 09:01
mike_g
I'm not completely sure. I had the same problem once before but forgot what I did to solve it.

When deleted does the object get reverted to Null? If that was it you could check that its not Null before returning it.
Tue, 10 Apr 2007, 09:27
Blitz3Dman
The way to avoid crashing is to exit the for each next loop with the exit command before you do any more with the type. hopefully that helps, I have no idea how to check it.

-=-=-
There are 10 kinds of people in this world -

( Insert 16 remarks about to what extent people know hex here )
Tue, 10 Apr 2007, 09:45
mike_g
That wouldent work using a handle for your types tho Blitz3Dman.

Something like this should though:

Have a variable that holds the number of objects that exist.

When you delete an object swap its handle with the handle number at the position to where the last object that exists is.

Then decrement the number of objects variable.

In your FOR loops simply run it till the number of object left.

All you will be doing then is swapping the pointers to the objects which should work fine.

Sorry if this is a confusing explanation.

Tue, 10 Apr 2007, 10:01
Blitz3Dman
ah... I see. I think.
Tue, 10 Apr 2007, 10:38
mike_g
Heres a working example of what I meant:

While its a method that works, it would probably be easier if you could check if the object exists.
Tue, 10 Apr 2007, 10:43
mike_g
Hey paul Ignore the above code the Null thing worked and its much easier. Example:

Tue, 10 Apr 2007, 12:19
Paul
Thx Mike and Blitz3dman
I'll try these examples out now