Whats wrong with this code?!
`setup
sync on
sync rate 60
backdrop on
color backdrop rgb(0,0,0)
autocam off
set window on
set window title "The zone editor v1.0"
set window position 0,0
`constants
#constant OPX object position x
#constant OPY object position y
#constant OPZ object position z
#constant OAX object angle x
#constant OAY object angle y
#constant OAZ object angle z
#constant CPX camera position x
#constant CPY camera position y
#constant CPZ camera position z
#constant CAX camera angle x
#constant CAY camera angle y
#constant CAZ camera angle z
`global variables
global ScrWidth as word
global ScrHeight as word
global ScrDepth as word
global fps as float
global duration as float
global elapsed as float
global Original as dword
global BaseMesh as dword
global StartTime as double integer
global EndTime as double integer
global OldTime as double integer
global TimeGap as double integer
global FrameGap as double integer
global CurrentTime as double integer
global MMX as float
global MMY as float
global MMZ as float
global MX as float
global MY as float
global MZ as float
global OMX as float
global OMY as float
global OMZ as float
global ParticleBase as dword
global ParticleCount as dword
global CurrentParticle as dword
global MeshCount as dword
global ImageCount as dword
global Dummy as dword
`types
type KeyType
State as byte
Pressed as boolean
Down as boolean
endtype
dim Key(220) as KeyType
type ParticleType
Exist as boolean
Life as float
MaxLife as float
Alive as boolean
Style as integer
FrameStyle as integer
StartSize as float
IncSize as float
XVel as float
YVel as float
ZVel as float
endtype
dim Particle(ParticleCount) as ParticleType
type MeshType
Path as string
endType
dim Mesh(0) as MeshType
type ImageType
Path as string
endtype
dim Image(0) as ImageType
type LevelType
Name as string
Info as string
Author as string
Ver as string
Mode as string
UseParts as boolean
FileLevel as string
FilePart as string
PartNum as byte
MinPlayers as byte
MaxPlayers as byte
endtype
dim Level(0) as LevelType
type StaticType
endtype
dim Static(0) as StaticType
type CameraType
CamPosX as float
CamPosY as float
CamPosZ as float
CamAngX as word
CamAngY as word
CamAngZ as word
Speed as byte
SetListener as boolean
endtype
dim Camera(0) as CameraType
type PlayerType
File as string
Name as string
Model as string
PlayerPosX as float
PlayerPosY as float
PlayerPosZ as float
PlayerAngX as word
PlayerAngY as word
PlayerAngZ as word
Health as word
Armor as word
Mass as word
Weapon as byte
Ammo as word
Status as byte
State as byte
Animation as integer
SoundSet as string
endtype
dim Player(0) as PlayerType
type AIType
File as string
Name as string
Model as string
AIPosX as float
AIPosY as float
AIPosZ as float
AIAngX as word
AIAngY as word
AIAngZ as word
Health as word
Armor as word
Mass as word
Weapon as byte
Ammo as word
Status as byte
State as byte
Animation as integer
SoundSet as string
endtype
dim AI(0) as AIType
type AINodeType
Mode as byte
NodePosX as float
NodePosY as float
NodePosZ as float
endtype
dim AINode(0) as AINodeType
type WeaponType
File as string
Name as string
Model as string
MaxAmmo as word
Mass as word
Damage as word
Status as byte
State as byte
Animation as integer
SoundSet as string
endtype
dim Weapon(0) as WeaponType
type LightType
LightPosX as float
LightPosY as float
LightPosZ as float
LightRed as byte
LightGreen as byte
LightBlue as byte
LightItensity as word
LightCorona as boolean
LightCoronaType as byte
endtype
dim Light(0) as LightType
type SoundType
File as string
SoundPosX as float
SoundPosY as float
SoundPosZ as float
SoundItensity as word
endtype
dim Sound(0) as SoundType
type AreaType
3D as boolean
Mode as string
X1 as float
Y1 as float
Z1 as float
X2 as float
Y2 as float
Z2 as float
endtype
dim Area(0) as AreaType
`init D3Dfunc dll
d3d_Init
`setup editor fonts
d3d_font 1,"Arial",15,0,0,0,255
`setup camera
position camera 0,50,50,50
point camera 0,0,0,0
`main loop
do
`draw camera info
d3d_starttext
d3d_text 1,0,0,0,"Camera position x: "+str$(floor(camera position x(0))),d3d_rgba (255,255,255,255)
d3d_text 1,0,15,0,"Camera position y: "+str$(floor(camera position y(0))),d3d_rgba (255,255,255,255)
d3d_text 1,0,30,0,"Camera position z: "+str$(floor(camera position z(0))),d3d_rgba (255,255,255,255)
d3d_text 1,0,45,0,"Camera angle x: "+str$(floor(camera angle x(0))),d3d_rgba (255,255,255,255)
d3d_text 1,0,60,0,"Camera angle y: "+str$(floor(camera angle y(0))),d3d_rgba (255,255,255,255)
d3d_text 1,0,75,0,"Camera angle z: "+str$(floor(camera angle z(0))),d3d_rgba (255,255,255,255)
d3d_endtext
`draw coordinate system
`position listener at player for 3D sound
position listener camera position x(0),camera position y(0),camera position z(0)
rotate listener camera angle x(0),camera angle y(0),camera angle z(0)
`setup camera controls
cr#=0:cf#=0
if upkey()=1 or keystate(17)=1 then cf#=5
if downkey()=1 or keystate(31)=1 then cf#=-5
if leftkey()=1 or keystate(30)=1 then cr#=5
if rightkey()=1 or keystate(32)=1 then cr#=-5
cr#=curvevalue(cr#,cr#,5)
cf#=curvevalue(cf#,cf#,5)
cx#=cx#+mousemovey()*0.2
cy#=cy#+mousemovex()*0.2
`if cx#>80 then cx#=80
`if cx#<-80 then cx#=-80
cx#=curveangle(cx#,cx#,2)
cy#=curveangle(cy#,cy#,2)
move camera cf#
rotate camera 0,wrapvalue(cy#-90),0
move camera cr#
rotate camera 0,wrapvalue(cy#+90),0
rotate camera cx#,cy#,0
sync
loop
end
I tried to compile this and all dbp does is return message compilation failed and nothing else.