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 / Alright, I'm going to the bottom of this...

Author
Message
WarWolf
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 23rd Sep 2002 21:26
I've finally got DBPro working at all, now at least the damn thing will start, and compiles some code.

Anyway try compiling this code...
It works perfectly in DB v1, but in DBPro it says that the endif before the return-command is "Out of place"...

SUB_sub:

if nightvision = 0

rem Position and rotate controller object
position object 30,object position x(11),object position y(11),object position z(11)
xrotate object 30,camera angle x()
yrotate object 30,angle

collided_cross=0

rem Run a forloop and move it forward a little bit
rem at a time and check whether it's colliding or not
for t=1 to 25

rem Move controller object
move object 30,200

rem Check collision
if object position y(30)
I didn't steal it!
WarWolf
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 23rd Sep 2002 23:34
Noone?
Alright...

I didn't steal it!
WarWolf
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 23rd Sep 2002 23:41
AHHH!!! Sorry, the code isn't correct! (should be in the code brackets...)

Here is the real thing...



I didn't steal it!
Richard Davey
Retired Moderator
21
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 24th Sep 2002 02:52
At a guess I'd say it could be down to the "exit" command - you shouldn't use exit to break out of conditional loops, but rather those with no set exit (such as a do loop or while loop). Worth a shot anyway.

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
DB Team / Atari ST / DarkForge / Retro Gaming
WarWolf
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 24th Sep 2002 15:56
Thanks Rich, I'll try it out.

I didn't steal it!

Login to post a reply

Server time is: 2024-04-19 06:59:15
Your offset time is: 2024-04-19 06:59:15