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 / How to fix Runtime Error 7007 - Object already exists

Author
Message
cochran2904
13
Years of Service
User Offline
Joined: 28th Mar 2011
Location: at my computer
Posted: 19th Jul 2011 09:05
The only 2 files i am loading into my project are:

Load Object "C:\Program Files\The Game Creators\FPS Creator Free\Files\entitybank\ww2\characters\SS-officer.x", 2

and

LoadMap:
Load Object "C:\Program Files\The Game Creators\Dark Basic Professional\castle\eow.dbo", 1

I get the error when i input: "Load Object "C:\Program Files\The Game Creators\FPS Creator Free\Files\entitybank\ww2\characters\SS-officer.x", 2"
Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 19th Jul 2011 09:14 Edited at: 19th Jul 2011 09:16
This error message occurs when you try to load an object using an object number which is already occupied. This can easily happen when using the load object command in loops. e.g

Will bring up an error because on the second iteration, it will try to create the object again but it already exists and so throws up an error.


works because the object is only created once.

An easy way around this is to use the object exist command


Hope that helps

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 19th Jul 2011 14:01
Or put it before the loop if that is the cause of the problem.

Login to post a reply

Server time is: 2024-04-26 09:50:16
Your offset time is: 2024-04-26 09:50:16