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.

Dark Physics & Dark A.I. & Dark Dynamix / I m getting this error[:x]...

Author
Message
solid snake21
18
Years of Service
User Offline
Joined: 26th Sep 2006
Location:
Posted: 26th Sep 2006 18:42
Hi..i just started using Dark Physics....when i compile and run the third tutorial i.e., Multiple Rigid Bodies, i get this error.

"Runtime Error 7007 - Object already exists at line 23"

The code is fine i know, but why am i getting this ....its frustrating...
just in case, i m pasting the code too...

phy start
sync on
sync rate 60
autocam off

make object box 1,10,0.5,10
position object 1,0,-0.25,0
phy make rigid body static box 1

position camera 0,2,-4

levels=20
ID=1

for y=0 to levels
for x=0 to levels-y
make object cube ID,0.2
color object ID,rgb(rnd(255),rnd(255),rnd(255))
position object ID,(x+0.5*y)*0.21-1.5,(y*0.21)+0.1,0
phy make rigid body dynamic box ID
inc ID
next x
next y

do
if spacekey()
make object sphere ID, 0.6
position object ID,camera position X(),camera position Y(),camera position Z()
phy make rigid body dynamic sphere ID
phy set rigid body linear velocity ID,0,3,10
inc ID
endif

phy update
sync
loop
Richard Davey
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 26th Sep 2006 18:48
Quote: "The code is fine i know"


Sorry, but it's not

You do:

make object box 1

Followed by (a few lines removed for clarity)

ID=1
make object cube ID,0.2

Which is great, except you've already created object 1. Change ID to 2. A lot of the DBPro error messages are I admit quite useless, but the one you had told you exactly what was wrong - you just needed to look for it.

"Bite my shiny metal ass" (Futurama)
"Don't ping my cheese with your bandwidth" (Dilbert)
solid snake21
18
Years of Service
User Offline
Joined: 26th Sep 2006
Location:
Posted: 26th Sep 2006 18:58
Now why didnt i think of that before [:p]...but anyways thnx man....i owe ya...i have done alot of programming in C and C++...i know i should have caught this bug....thnx anyway...
Richard Davey
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 26th Sep 2006 19:07
No worries. I always prefer it when it's a user error as opposed to a DBPro error

"Bite my shiny metal ass" (Futurama)
"Don't ping my cheese with your bandwidth" (Dilbert)
solid snake21
18
Years of Service
User Offline
Joined: 26th Sep 2006
Location:
Posted: 26th Sep 2006 19:12
Hey amn...tell me, can i make a game equal to F.E.A.R with all the shaders, particle effects, physics, rag dolls etc ????
Richard Davey
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 26th Sep 2006 19:40
I would have to say that, realistically, you'd be wise to set your sights a little lower. FEAR does some amazing stuff, has some extremely cool AI, very very hot graphics and sound, not to mention some uber physics.

In short, good luck re-creating it

"Bite my shiny metal ass" (Futurama)
"Don't ping my cheese with your bandwidth" (Dilbert)
solid snake21
18
Years of Service
User Offline
Joined: 26th Sep 2006
Location:
Posted: 26th Sep 2006 19:45
But man what i meant was that, do Dark Basic Professional has the capability of creating games such as FEAR.....:p
Lani
18
Years of Service
User Offline
Joined: 14th Aug 2006
Location:
Posted: 2nd Oct 2006 13:26
Dark Basic probably has most of the power to recreate such things, but I must admit I sometimes find myself limited by it, for example there´s no way to control anti-alias settings (on the graphics card) via DBP. Maybe not the best example, but the only one I could come up with off the top of my head. There also seems to be some issues with FX files, but to be honest I am not sure whether lower-level control would benefit me here, or if they´re just too advanced for me.

Login to post a reply

Server time is: 2024-11-24 15:02:53
Your offset time is: 2024-11-24 15:02:53