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.

Author
Message
Lord_Agrikid
14
Years of Service
User Offline
Joined: 12th Dec 2011
Location:
Posted: 12th Dec 2011 18:34
I Just Got DBpro and I used the FPS tutorial and followed it to the letter and I ran it and BOOM Label \'?\' does not exist at line 19
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 12th Dec 2011 22:10 Edited at: 12th Dec 2011 22:12
Hi Lord_Agrikid


gosub is short for "go subroutine". Here is a very simple example of a subroutine:



Notice that the subroutine has a label (the name you give it), and a return at the end. This helps organize your code so it doesn't get all messy. So how do you use a subroutine? Like this:



So what's new? We have the command gosub. What that does is it will search for the label This_Is_A_Subroutine in your program, and jump there. It then begins to execute whatever comes after the label until it runs into the return command. What that return command does is it sends the program back to where you called the subroutine in the first place, and then continues from there (in our example it then proceeds into the loop we created just underneath).

So why is this stupid gosub _control_enemies not working you might ask? The compiler is telling you that it cannot find the label _control_enemies, which means that that subroutine doesn't exist in your program.

The information you provided is not enough to tell you how to fix it. You will have to upload the project folder so we can look at it more in depth. I also advise you to look at some of our great tutorials we have on the forum. Can someone post a link or something, as I have no idea where they are now

TheComet

Hodgey
16
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 12th Dec 2011 22:20
Here are TDK's tutorials. I've referenced these so many times now I wish there was a little button in the post message box that just inserted the link.

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 13th Dec 2011 06:48
Or if you have the budget... buy hands on dark basic 1 -2

Login to post a reply

Server time is: 2026-07-10 03:09:56
Your offset time is: 2026-07-10 03:09:56