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 / Load Object bug????

Author
Message
klukk
22
Years of Service
User Offline
Joined: 13th Feb 2003
Location: Iceland
Posted: 14th Feb 2003 03:42
Ahoy mates!

I've got a little problem that's making my coding progress come to a screeching halt.

here are two functions from my code:



ok, the problem is that when I first call distribute collectables (to place collectable items in my level), then everything works fine. Before every sync, checkplayergrabcollectible is called to check of the player has grabbed any collectables. The problem is that, when all collectables have been, well, collected and I'm making the next level, then I get a error when calling the distributecollectables. The error is: "Runtime error 7018. Could not load 3d object at line..." When I used a cube for the collectable instead of an .x object (see the rem'ed line above the load object in distributecollectables), then everything worked like a charm, but now it's just fubar.....

Any takers????
- If nothing sticks to teflon, then how do they make teflon stick to the pan???
klukk
22
Years of Service
User Offline
Joined: 13th Feb 2003
Location: Iceland
Posted: 14th Feb 2003 16:21
Sorry about the bump, but this is problem hs all but stopped my progress on my games.

Does anyone know something about this?

- If nothing sticks to teflon, then how do they make teflon stick to the pan???
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 14th Feb 2003 18:14
@klukk

Can you explain your problem a bit more clearly. You are saying that if you use a .X object for the collectible it works fine, but not if you use a 3D primitive cube Ie. Can you make a short tech demo showing this problem.

NOBODY has a forum name as stupid as Darth Shader. I do.
Richard Davey
Retired Moderator
23
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 14th Feb 2003 19:12
My immediate thought would be that your object is not being deleted. That would cause the "load object" command to barf (very little else will). Try something like "if object exists()" before the load object command and remove it at that point?

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
DB Team / Atari ST / DarkForge / Retro Gaming
klukk
22
Years of Service
User Offline
Joined: 13th Feb 2003
Location: Iceland
Posted: 14th Feb 2003 21:51
@rich

It's not that because then you get a "Object already exists" error. I'm getting a "Cannot load 3d object error". Also, when I use cubes (make object cube) instead of .x file (load object), then it works quite nicely.....

puzzling eh?

- If nothing sticks to teflon, then how do they make teflon stick to the pan???
klukk
22
Years of Service
User Offline
Joined: 13th Feb 2003
Location: Iceland
Posted: 14th Feb 2003 22:38
okay, problem solved,and booooyyy, was it far fetched.

The problem was that I was calling the distributecollectibles function for my new levem from this code:



This works if I change the code to this (quick fix)



Then in my mai rendering/event loop i check for the ALLDONE flag:



This seems to solve my problem. Now the only question left is.....why did this solve it? I have no clue, I was just messing around with my code and stumbled upon this.....

A very large kudos to whomever is able to explain to me what was wrong...

- If nothing sticks to teflon, then how do they make teflon stick to the pan???

Login to post a reply

Server time is: 2025-05-18 02:43:56
Your offset time is: 2025-05-18 02:43:56