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.

Newcomers DBPro Corner / extends RTS skybox bug

Author
Message
tokyomage
14
Years of Service
User Offline
Joined: 26th Sep 2010
Location: on your roof
Posted: 5th Oct 2011 23:40
Hey guys,

So iv been using dark basic professional for a while til i came across extends so i bought started trying it out and then started implementing its real time skybox feature into my game

Then i came across a bug that is not even letting me start my demo,
I attached the source on this post so please take a look at that right here:






:The problem: So when i run and compile my code i am unhappy to see a "runtime error 7007 - object already exists at line 85" error.

What i think: I believe that
at line 37:"rts setup skybox "RTS_snowmountain", 1" in it, at the end where you see the number is supposed to be a camera type. But i believe it is perceiving it as an object, meaning
at line 85"load object "files/models/swat/H-SWAT-Idle.x",1" it apparently takes that camera type as object.
Just my opinion, if you have any ideas then please feel free to post any ideas on how i can fix this.

Thanks,

-Tokyomage

.....the feel of solitude hurts inside....
tokyomage
14
Years of Service
User Offline
Joined: 26th Sep 2010
Location: on your roof
Posted: 6th Oct 2011 03:53
Anybody?

-Tokyomage

.....the feel of solitude hurts inside....
tokyomage
14
Years of Service
User Offline
Joined: 26th Sep 2010
Location: on your roof
Posted: 23rd Oct 2011 03:39
*typing this comment so this post can be seen at the top of the dbpro newcomers board*

-Tokyomage

.....the feel of solitude hurts inside....
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 25th Oct 2011 00:05
Instead of using numbers for when you load an object, use IanM's "Find Free Object" command (from the Matrix1 plugin), and store it in a variable.

e.g

playerObjID=find free object()
load object "files/player.x",playerObjID

Hope that helps.

29 games
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 25th Oct 2011 00:45 Edited at: 25th Oct 2011 00:47
Not to rain on the =PRoF='s solution but it seems to me that the problem has been defined.

Quote: "What i think: I believe that at line 37:"rts setup skybox "RTS_snowmountain", 1" in it, at the end where you see the number is supposed to be a camera type. But i believe it is perceiving it as an object, meaning at line 85"load object "files/models/swat/H-SWAT-Idle.x",1" it apparently takes that camera type as object.Just my opinion, if you have any ideas then please feel free to post any ideas on how i can fix this."


@tokyomage, did you try changing the sky box number to something different and did this sort out the problem? I can't run the code myself as I don't have the relevant plug ins
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 25th Oct 2011 11:18
The problem is the extends sky box uses some objects (if memory serves correctly about 8 of them), and Tokyomage is then trying to use the same object numbers in his code.

29 games
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 25th Oct 2011 23:12
Sorry =Prof=, I think my post was badly worded.

What I meant was that tokyomage had come up with an idea of he thought the problem was but hadn't mentioned if he'd actually changed any of the object number's to see if his theory was correct. It wouldn't be difficult to change the skybox number to see if this would've solved the problem.

I agree with you, object id management is very important, especially when you start having to load in large numbers of objects so using something like the FIND FREE OBJECT command and variables for object id's is a sensible idea.
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 25th Oct 2011 23:19
@29 games:

It's ok, I understand what you mean, but even if you do change the SkyBox number it wouldn't help. The Object Numbers the RTS Skybox reserves for itself are internal, and independant of the Skybox number.

29 games
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 25th Oct 2011 23:54
Yes, that makes sense.

I just use vanilla DBP with Sparky's collision so I have no idea what half these plugins do, let alone how they work.
Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 28th Oct 2011 16:04
I've found issues with Extends using up object Ids, and sprite Ids in the GUI functions. I had to offset my Ids to avoid problems, but that was a long time ago.

Login to post a reply

Server time is: 2024-11-22 12:11:53
Your offset time is: 2024-11-22 12:11:53