I believe you are using Include incorrectly. When you "Include" a file, you are basically putting the source where the include is. So do something like this:
Then you compile Main.bb. The compiler, when it compiles will see Main.bb as though you had written everything into one source code like so:
Inserting Menu.bb right where the "Include" was in Main.bb
;Main.bb Include "Menu.bb" Graphics 800,600 While Not KeyHit(1) If KeyHit(MENU_KEY) a = Menu() Print "You Pressed " + a Wend End
;Menu.bb Const MENU_KEY = 59 Function Menu() Repeat Print "1) Do Nothing" Print "2) Don't do anything" Print "3) Nothing done here" a = Input("Your Choice? " Until a > 0 And a < 4 Return a End Function
Then you compile Main.bb. The compiler, when it compiles will see Main.bb as though you had written everything into one source code like so:
;Main.bb ;Menu.bb Const MENU_KEY = 59 Function Menu() Repeat Print "1) Do Nothing" Print "2) Don't do anything" Print "3) Nothing done here" a = Input("Your Choice? " Until a > 0 And a < 4 Return a End Function Graphics 800,600 While Not KeyHit(1) If KeyHit(MENU_KEY) a = Menu() Print "You Pressed " + a Wend End
Inserting Menu.bb right where the "Include" was in Main.bb