Here is my code right now, I have seperated them into two sources, the "Main_source" and the "functions" source.
Main_Source:
- Code: Select all
'*** Main Source File ***
'*** Includes ***
Include "Functions.CB"
'*** Setup the game
setup_game()
setup_player()
'*** Main Loop ***
Repeat
PlayObject player_run, 1,8, 0.5
DrawScreen
Forever
Functions source:
- Code: Select all
'*** Functions ***
'*** Screen Setup function ***
Function setup_game()
SCREEN 1024, 768, 32
ShowMouse OFF
FrameLimit 32
EndFunction
'*** Player Creation function ***
Function Setup_player()
player_run = LoadAnimObject("Media\Sprites\Charles_run.png", 100,100, 0,7)
EndFunction
Now, if I place this line: player_run = LoadAnimObject("Media\Sprites\Charles_run.png", 100,100, 0,7) just before the main LOOP, the program compiles successfully. Cut/Pasting the functions from "functions" source to "Main_Source" has no effect either, the error is still there. Any ideas why this strange behaviour occurs? Please help me out and thanks in advance!





<- protestipelikilpailun voittaja.