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 / Help with Some Code Please : Programe keeps exiting?

Author
Message
Colin Hart
21
Years of Service
User Offline
Joined: 28th Apr 2003
Location: United Kingdom
Posted: 5th May 2005 06:28
Evening All.

I have attached my code for a game i'm hoping to be working on. I'm having a few problems early on.... (worrying really)

Anyways if anyone can shed some light onto teh reasons why I would be most greatful.

I'm a beliver in open source code. So I have attached the whole thing. Help your self to the ideas, code. Please remember me when you all become rich and famouse. I will be creating a web-site for the game when I have something worth while to show.

Anyway i'm woffaling on... Thank you for your support.
Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 5th May 2005 08:46 Edited at: 5th May 2005 08:49
well for starters (not sure if it's the only problem)
you don't have "sync on" when you set "sync rate 20" at line 18

try adding "sync on" before you set the sync rate

also i suggest putting your gosub calls before your functions...

so it'd end up something like this...




Quote: "Help your self to the ideas, code. Please remember me when you all become rich and famouse."

111 lines...i'm really feeling rich
Hope that's a joke

"We make the worst games in the universe."

Colin Hart
21
Years of Service
User Offline
Joined: 28th Apr 2003
Location: United Kingdom
Posted: 6th May 2005 22:39
Thank you... yes the sync does need to be added.. how ever the program still exits straight away.

Any Ideas??


Colin.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 6th May 2005 23:59
Well well done sofar, however your code will always end as it not in a loop, if you follow your code all the way to the end
Quote: "
`Plan is to load the image and then move the image,

`main program
gosub _loadimages
gosub _MainEngine
"

You will see that when it called gosub _Mainengine the code goes to _MainEngine get to the return command it comes back to the next line in your code which has nothing there so it just stops.

try putting into a do loop eg:
do
`Plan is to load the image and then move the image,

`main program
gosub _loadimages
gosub _MainEngine
loop

give this a try and if you find it still not working can give you the answer, However thought you would like to work it out for yourself once you are guided the the right dircetion.

In Space No One can Hear You Scream! (When your comm Line is cut?)

Login to post a reply

Server time is: 2024-09-23 19:27:23
Your offset time is: 2024-09-23 19:27:23