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 / need help newb here please!

Author
Message
Dead_Zone
19
Years of Service
User Offline
Joined: 6th Jul 2005
Location:
Posted: 24th Oct 2005 06:58
hey there everyone im trying to aproach making my game step by step but im having small problems im trying to figure out a way to load objects using a subroutine then using the return command to go to the next command in the main loop but it tries to load objects twice so i get an error and my game closes cause it keeps trying to reload i am hoping someone can help me with my problem
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 24th Oct 2005 15:21
The source button doesn't work. Use the Code tags instead ([code ] [/code ])



Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 24th Oct 2005 22:35
I know what you mean.

The program looks probably like this:



But this means indeed that it will try to load the object twice. First it runs the sub, then it continues and meets the sub again: it runs it twice.

Try putting an ending at your program using the command "end".

This makes the program look somthing like this:



I hope you understand the problem...

Cheerz

Sven

Immunity and Annihalation makes Immunihalation...
Dead_Zone
19
Years of Service
User Offline
Joined: 6th Jul 2005
Location:
Posted: 25th Oct 2005 02:38
i eventually did this

gosub _LOADTESTSCENE

do
main()
FASTYNC
loop

_LOADTESTSCENE:
load object "blah.x"
return


thanks anyways guys my mistake was stupid i did this

do
gosub _LOADTESTSCENE
main()
FASTSYNC
loop

_LOADTESTSCENE:
load object "blah.x"
return

thats why it was duplicating cause it was being looped after all lol

Login to post a reply

Server time is: 2024-09-24 07:34:59
Your offset time is: 2024-09-24 07:34:59