I looked at my code
Main Source
Rem ********Main Gameplay***********
sync on : sync rate 60
do
#include "C:\Program Files\The Game Creators\Dark Basic Professional\Projects\TWOA\Gamplay\Character_Movment\Character_Control.dba"
load object "C:\Documents and Settings\jeffc\Desktop\TheWarOFAthenor\Models\maps\Port Kalidor\Port_Kalidor.x",1
Charcontrol()
loop
Character Controller Function
` load/create character
make object box 1, 20, 30, 20
` Create character controller
phy make box character controller 1, 0, 0, 0, 20, 30, 20, 1, 10, 85
position object 1, 0, 0, 0
` function to conrol the character
` to call in main loop of gameplay
Function Charcontrol()
` move character
if upkey()=1
phy move character controller 1, 5
endif
if downkey()=1
phy move character controller 1, -5
endif
if rightkey()=1
turn object right 1, 5
endif
if leftkey()=1
turn object left 1, 5
endif
` control the camera following the object
set camera to follow 0, object position x(1), object position y(1), object position z(1), object angle x(1)/1.21, 75, 60, 20, 0
set camera to object orientation 0, 1
xrotate camera 0, object position x(1)
point camera 0, object position x(1), object position y(1), object position z(1)
sync
endfunction
I remed everything out and inserted one command at a time and compiled.
It compiled and ran fine until I un-remed the #include command in the main source.
Why is this not working?
is it for sure the #include command?