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 / object does not exist

Author
Message
SilentNick
14
Years of Service
User Offline
Joined: 1st Dec 2009
Location:
Posted: 25th Feb 2010 11:07
i am making an fps and it is generating an "object does not exist" error





the line it generates an error from is:
in the second line, any help would be appreciated ...

Thanks
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 25th Feb 2010 17:21
Quote: "i am making an fps"


It seems like you are extending an fps in the examples folder called "monster hunt".

Your code tells us NOTHING at all. There aren't any objects created or checked in any of your code you posted. Did you create a matrix? Do all decoration objects exist? Did you think you could extend those pillars and make more of them?

Please post ALL of your code so we can help you.

TheComet

Link102
19
Years of Service
User Offline
Joined: 1st Dec 2004
Location: On your head, weeeeee!
Posted: 25th Feb 2010 19:24 Edited at: 25th Feb 2010 19:25
you get the "object does not exist" when you preform an action on an object that, well, doesn't exist. Most often caused by mass object handling where the object number is a variable and it "overshoots" the amount of objects.
Sadly DBC doesn't always give the correct line number. The faulty code should be around that line though.

- check your OBJECT handeling codes, placing "rem" in front of certain bits of code works well.
- like TheComet says, post your code so we can have a looksey

Robert The Robot
17
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 25th Feb 2010 22:18
-like TheComet says, post your code so we can have a looksey
-like Link102 says, post your code so we can have a looksey
(I'm getting caught in a loop here... )

Oh, and check the lines immediately before you put in a call to "DecoCollide(X#,Y#,Z#)". If DBC triggers an error, it can take a few lines of code to register - which could occur when the code is partway through your function. Alternatively, if you use the result "Collide" as a part of a command to reposition an object, that command could be triggerring the error, but DBC reports it as a problem in the function.

The function is itself sound and shouldn't give any trouble - provided, of course, that you're certain matrix 1 is 8000x8000 units across.

"I wish I was a spaceman, the fastest guy alive. I'd fly you round the universe, in Fireball XL5..."

Login to post a reply

Server time is: 2024-04-27 11:15:14
Your offset time is: 2024-04-27 11:15:14