Hi BEAST. I've taken a look and the problem is that in your main source file (the one in which execution starts), you only have one function call.
Rem Project: RPG Tutorial
Rem Created: 9/17/2006 8:34:36 AM
Rem ***** Main Source File *****
Initialize_Menu()
When you include other source files, as you have done, they are actually appended on to the end of the main source file at compile time. This means that after Initialize_Menu() has run, execution moves on to the next commands. However as your other source files are filled with functions (as they should be), this means that the program hits a function declaration mid program and terminates.
To help you better understand what is happening, if you look inside your .dbpro file, you will see this.
; ****Source file information****
main=RPG Tutorial.dba
include1=Initalize_Game.dba
include2=Functions\generic_functions.dba
include3=Functions\Buttons.dba
include4=Functions\Parser Functions.dba
include5=Menus\Main Menu.dba
final source=_Temp.dbsource
This means that the content of each of the includes (1-5) will be appended to that of the main file and put into _Temp.dbsource. So the first thing the compiler will do is to add Initialize_Game.dba to the contents of RPG Tutorial.dba and so the code will look like this.
Rem Project: RPG Tutorial
Rem Created: 9/17/2006 8:34:36 AM
Rem ***** Main Source File *****
Initialize_Menu()
Rem *** Include File: Initalize_Game.dba ***
Rem Created: 9/17/2006 8:50:30 AM
Rem Included in Project: C:\Program Files\Dark Basic Software\Dark Basic Professional\Projects\RPG Tutorial\RPG Tutorial.dbpro
Function Initialize_Menu()
Sync On:Sync Rate 0:Autocam Off
Initialize_Parser()
Endfunction
When you do this, the error becomes clear because after running Initialize_Menu(), the next non-comment line is the function declaration for Initialize_Menu().
To prevent this error, you need to ensure that you never hit a function mid program, either by adding an infinite main loop or an end statement. Adding an end statement to RPG Tutorial.dba like so
Rem Project: RPG Tutorial
Rem Created: 9/17/2006 8:34:36 AM
Rem ***** Main Source File *****
Initialize_Menu()
end
fixes the problem in as much as you don't hit a function during execution. However it does mean that as soon as your menu is initialised, the program closes again which is probably not what you want.
I hope that helps. Do let me know if you need any further help with this.