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 / Problems with "build final"

Author
Message
Tristan
20
Years of Service
User Offline
Joined: 18th May 2004
Location:
Posted: 18th May 2004 23:53 Edited at: 19th May 2004 00:00
My game runs corectly inside DarkBasic(classic) but when I "Build Final" and run it, it flashes the end game screen and exits to windows instead of waiting for players return key. Can anyone suggest why.

Below is the end game sequence
X#,Z# = camera x and z position
ox#,oz# = target object x and z position

rem check to see if the player has found the cone
if X#>ox#-50 and X#<ox#+50 and Z#>oz#-50 and Z#<oz#+50
stop music 3
load image "winscreen.bmp",2
paste image 2,0,0
if returnkey()=1
end
endif
endif
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 19th May 2004 00:08 Edited at: 19th May 2004 00:08
add wait key or loop until return key


* DBP_NETLIB_v1.1 - VB.NET PLUGIN FOR DBP * Click Logo
Tristan
20
Years of Service
User Offline
Joined: 18th May 2004
Location:
Posted: 19th May 2004 21:29
I'm not sure what you mean? Could you put it into my code?
Lampton Worm
22
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United Kingdom
Posted: 19th May 2004 22:08
Hi,

Basically your code runs through the "if returnkey()=1" and only checks it once, you want to stop or loop until returnkey is pressed, something like...



or



or

You may need to put a sync before it just to refresh, depends on the rest of your code.

Check this code, it'll wait until you press return...



Hope it helps,
Cheers.
Tristan
20
Years of Service
User Offline
Joined: 18th May 2004
Location:
Posted: 20th May 2004 21:32 Edited at: 20th May 2004 21:33
That all works fine inside the dark basic editor but when I "Build Final" and run it, it flashes the end game screen and exits to windows instead of waiting for players return key.

Here's the whole of my code can anyone suggest why this is happening.

Francesco
20
Years of Service
User Offline
Joined: 11th Apr 2004
Location: Milan, Italy
Posted: 20th May 2004 21:49 Edited at: 20th May 2004 21:50
I just eliminated the media in your code (I didn't feel like reloading all of it), and the final programme works like you meant to it work...dunno what happens on your computer.
Cheers

Non si inalberi mica con me, sa!
Lei è venuto qui, lei ha il tombino intasato!
Siamo uno spurgo serio, noi!

Login to post a reply

Server time is: 2024-11-26 18:39:37
Your offset time is: 2024-11-26 18:39:37