I keeep getting a Syntax Error with this code I am trying to do a straffing Hovertank which also turns so it uses the 6 axies I believe that Dark Basic can do it as I have tried it with Scopyo's Hilled code but I can 't seem to get this to work, can anyonehelp please?
Rem * Title : Hovertank Test 2
Rem * Author : I George
Rem * Date : 25/07/04
rem STRAFFING, TURNING HOVERCRAFT
rem ==========================================
rem This is an attempt to make a hovercraft which turns,
rem goes foward and backward and straffes, to be a basis for a hovertank
rem ------------------------------------------
rem by Vampyre(Ian George)
autocam off
hide mouse
sync off
Rem make matrix
Make matrix 1,10000,10000,20,20
Rem texture matrix
Load image "grass09.bmp",1
Prepare matrix texture 1,1,1,1
Fill matrix 1,0,1
rem Randomize the matrix
randomize matrix 1,125
X#=5000
Z#=5000
rem load hovercraft object
load object "HOVER1.X",2
rem Rotate and fix data so character faces right way
xrotate object 2,0
yrotate object 2,180
zrotate object 2,0
fix object pivot 2
rem Scale your object to double its width and depth, but not height
scale object 2,1200,1200,1200
rem Make drone to mark a back position
make object sphere 3,10
rem Set camera range
set camera range 1,10000
rem Main loop
do
rem movement
if joystick left()=1 then turn object left 2,5
if joystick right()=1 then turn object right 2,5
rem up
IF joystick slider a()=0
X# = NEWXVALUE(X#,WRAPVALUE(aY#),1)
Z# = NEWZVALUE(Z#,WRAPVALUE(aY#),1)
ENDIF
rem down
IF joystick slider a() =-65535
X# = NEWXVALUE(X#,WRAPVALUE(aY#-180),1)
Z# = NEWZVALUE(Z#,WRAPVALUE(aY#-180),1)
ENDIF
rem left
IF joystick twist z()=1000
X# = NEWXVALUE(X#,WRAPVALUE(aY#-90),1)
Z# = NEWZVALUE(Z#,WRAPVALUE(aY#-90),1)
ENDIF
rem right
IF joystick twist z()=-1000
X# = NEWXVALUE(X#,WRAPVALUE(aY#-270),1)
Z# = NEWZVALUE(Z#,WRAPVALUE(aY#-270),1)
ENDIF
oX# = OBJECT POSITION X(2)
oZ# = OBJECT POSITION Z(2)
hover# = (hover#+hovinc#)
IF hover#>0.6
hovinc# = -0.03
ENDIF
IF hover#<0.1
hovinc# = 0.03
ENDIF
POSITION OBJECT 2,X#,(Y#+3+(hover#)),Z#
IF OBJECT COLLISION(2,0)>6
POSITION OBJECT 2,oX#,(Y#+3+(hover#)),oZ#
ENDIF
if X#<0 then X#=0
if X#>200 then X#=200
if Z#<13 then Z#=13
if Z#>200 then Z#=200
POSITION OBJECT 2,X#,(Y#+3+(hover#)),Z#
rem HAT control
jhat=joystick hat angle(0)
rem text 320,160,"HAT signal: "+str$(jhat)
rem **** use these lines below if you want the view to be immediate
rem **** and rem out the other lines that aren't needed
rem **** integrity checks for code alterations are included
rem turnview=0
rem if jhat=27000 or jhat=31500 then turnview=-90
rem if jhat=9000 or jhat=4500 then turnview=90
rem if jhat=18000 or jhat=13500 or jhat=22500 then turnview=180
rem horizontal view position
if turnview>0 and turnview<180 then turnview=turnview-2:if turnview<0 then turnview=0
if turnview>179 then turnview=turnview+2:if turnview>359 then turnview=0
if jhat=27000 or jhat=31500 or jhat=22500 then turnview=wrapvalue(turnview-4):if turnview>180 and turnview<220 then turnview=220
if jhat=9000 or jhat=4500 or jhat=13500 then turnview=wrapvalue(turnview+4):if turnview<180 and turnview>140 then turnview=140
rem vertical view position
if pitchview>0 and pitchview<180 then pitchview=pitchview-2:if pitchview<0 then pitchview=0
if pitchview>179 then pitchview=pitchview+2:if pitchview>359 then pitchview=0
if jhat=18000 or jhat=13500 or jhat=22500 then pitchview=wrapvalue(pitchview-4):if pitchview>180 and pitchview<280 then pitchview=280
if jhat=0 or jhat=4500 or jhat=31500 then pitchview=wrapvalue(pitchview+4):if pitchview<180 and pitchview>80 then pitchview=80
If InKey$() = "1" And cammode = 0 Then cammode = 1 : `Set the camera mode to third person
If InKey$() = "2" And cammode = 1 Then cammode = 0 : `Set the camera mode to first person
If cammode = 0
rem Place camera and set orientation to object
position camera object position x(2),object position y(2),object position z(2)
set camera to object orientation 2
EndIf
If cammode = 1
rem Place camera and set orientation to object
position camera object position x(3),object position y(3),object position z(3)
set camera to object orientation 2
rem now set turnview as needed for HAT control
turn camera right turnview
pitch camera up pitchview
rem and reset the camera view back to normal to center everything
turn camera left turnview
sync
loop