this program wont run, when i compile it, the screen goes black for a split second then then the program ends. Can anyone tell me the problem.
autocam off
position camera -16.452333,0,-15.377111
rem pointer
rem pointer
make object sphere 4,0.5
rem technologies
dim tech$(9)
tech$(1)="coal "
tech$(2)="natural gas "
tech$(3)="oil "
tech$(4)="solar "
tech$(5)="geothermal "
tech$(6)="hydro "
tech$(7)="nuke fission"
tech$(8)="tide "
tech$(9)=" "`nothing is being researched
dim coal$(2)
coal$(1,1)="low1"
coal$(1,2)="low2"
coal$(1,3)="low3"
coal$(2,1)="high1"
coal$(2,2)="high2"
coal$(2,3)="high3"
rem variables
energy=0
damage=0
points=0
real_damage=0
global_warming_years=400
current_research$=tech$(9)
research_time=0
coal_powerstations=0
gas_powerstations=0
oil_powerstations=0
coalpos$="in"
oilpos$="in"
gaspos$="in"
researchpos$="in"
damagepos$="in"
energypos$="in"
pointspos$="in"
coalresearchpos$="out"
gasresearchpos$="out"
oilresearchpos$="out"
rem all the colours that are used
red=rgb(255,0,0)
green=rgb(0,255,0)
blue=rgb(0,0,255)
maroon=rgb(176,48,96)
dark_orchard=rgb(153,50,204)
magenta=rgb(255,0,255)
dark_green=rgb(0,62,0)
light_green=rgb(39,114,0)
steel_blue=rgb(70,130,180)
dark_slate_blue=rgb(72,61,139)
dark_orange=rgb(255,140,0)
saddle_brown=rgb(139,69,19)
monorail_silver=rgb(198,195,191)
dim_gray=rgb(105,105,105)
olive_drab=rgb(107,142,35)
oil=rgb(47,100,60)
colour_solar=rgb(230,150,0)
geo=rgb(100,40,20)
royal_blue=rgb(65,105,225)
black=rgb(0,0,0)
yellow=rgb(255,255,0)
white=rgb(255,255,255)
print "3rd wait"
wait key
rem biulding panels
rem coal
rem main panel
make object box 1,8,12,0
rem title
make object box 2,6,1,0
make mesh from object 11,2
delete object 2
add limb 1,1,11
offset limb 1,1,0,5,-1
color limb 1,1,black
rem tab
make object box 2,2,2,0
make mesh from object 1,2
delete object 2
add limb 1,2,1
offset limb 1,2,-5,5,0
rem list of avaivible coal biuldings
make object box 13,3,8,0
make mesh from object 8,13
delete object 13
add limb 1,3,8
offset limb 1,3,-1,0,-1
color limb 1,3,dark_orchard
rem oil
rem main panel
make object box 2,8,12,0
color object 2,oil
rem tab
make object box 3,2,2,0
make mesh from object 2,3
delete object 3
add limb 2,1,2
color limb 2,1,oil
offset limb 2,1,-5,3,0
rem gas
rem main panel
make object box 3,8,12,0
color object 3,gas
rem tab
make object box 5,2,2,0
make mesh from object 3,5
delete object 5
add limb 3,1,3
color limb 3,1,gas
offset limb 3,1,-5,1,0
rem energy
rem small panel
make object box 5,2,2,0
position object 5,-10,-8,0
color object 5,green
rem big panel
make object box 10,10,10,0
position object 10,100,100,0
color object 10,green
rem damage
rem small panel
make object box 6,2,2,0
position object 6,-8,-8,0
color object 6,red
rem big panel
make object box 11,10,10,0
position object 11,100,100,0
color object 11,red
rem points
rem small panel
make object box 7,2,2,0
position object 7,-6,-8,0
color object 7,blue
rem big panel
make object box 12,10,10,0
position object 12,100,100,0
color object 12,blue
rem research
rem small panel
make object box 8,1,1,0
position object 8,-12,-8,0
color object 8,monorail_silver
rem big panel
make object box 9,10,10,0
position object 9,100,100,0
rem titles
rem coal
make object box 15,2.5,0.5,0
make mesh from object 12,15
delete object 15
add limb 9,1,12
offset limb 9,1,-3.5,3,-1
color limb 9,1,black
rem gas
add limb 9,2,12
offset limb 9,2,-3.5,2,-1
color limb 9,2,steel_blue
rem oil
add limb 9,3,12
offset limb 9,3,-3.5,1,-1
color limb 9,3,oil
rem panels
rem coal
make object box 15,6,6,0
color object 15,black
position object 15,object position x(9),object position y(9),-1
rem gas
make object box 16,6,6,0
color object 16,steel_blue
position object 16,200,200,0
rem oil
make object box 17,6,6,0
color object 17,oil
position object 17,200,200,0
print "wait"
wait key
do
text object position x(4),object position y(4),"hi"
rem some controls for the panels
rem moving them out
rem coal panel
if object position x(4)>limb position x(1,2)-2
if object position x(4)<limb position x(1,2)+2
if object position y(4)>limb position y(1,2)-2
if object position y(4)<limb position y(1,2)+2
if coalpos$="in"
if mouseclick()=1
print "coal"
rem geeting coal on top
position object 1,object position x(1),object position y(1),object position z(1)-0.001
position object 2,object position x(2),object position y(2),object position z(2)+0.001
position object 3,object position x(3),object position y(3),object position z(3)+0.001
rem moving coal to the left
position object 1,object position x(1)-10,object position y(1),object position z(1)
coalpos$="out"
wait 250
endif
endif
endif
endif
endif
endif
rem oil panel
if object position x(4)>limb position x(2,1)-2
if object position x(4)<limb position x(2,1)+2
if object position y(4)>limb position y(2,1)-2
if object position y(4)<limb position y(2,1)+2
if mouseclick()=1
if oilpos$="in"
print "oil"
position object 1,object position x(1),object position y(1),object position z(1)+0.001
position object 2,object position x(2),object position y(2),object position z(2)-0.001
position object 3,object position x(3),object position y(3),object position z(3)+0.001
position object 2,object position x(2)-10,object position y(2),object position z(2)
oilpos$="out"
endif
endif
endif
endif
endif
endif
rem gas panel
if object position x(4)>limb position x(3,1)-2
if object position x(4)< limb position x(3,1)+2
if object position y(4)>limb position y(3,1)-2
if object position y(4)<limb position y(3,1)+2
if mouseclick()=1
if gaspos$="in"
position object 1,object position x(1),object position y(1),object position z(1)+0.001
position object 2,object position x(2),object position y(2),object position z(2)+0.001
position object 3,object position x(3)-10,object position y(3),object position z(3)-0.001
gaspos$="out"
endif
endif
endif
endif
endif
endif
rem moving them in
rem coal
if object position x(4)>limb position x(1,2)-2
if object position x(4)<limb position x(1,2)+2
if object position y(4)>limb position y(1,2)-2
if object position y(4)<limb position y(1,2)+2
if mouseclick()=1
if coalpos$="out"
position object 1,object position x(1)+10,object position y(1),object position z(1)
coalpos$="in"
endif
endif
endif
endif
endif
endif
rem oil
if object position x(4)>limb position x(2,1)-2
if object position x(4)<limb position x(2,1)+2
if object position y(4)>limb position y(2,1)-2
if object position y(4)<limb position y(2,1)+2
if mouseclick()=1
if oilpos$="out"
position object 2,object position x(2)+10,object position y(2),object position z(2)
oilpos$="in"
endif
endif
endif
endif
endif
endif
rem gas
if object position x(4)>limb position x(3,1)-2
if object position x(4)<limb position x(3,1)+2
if object position y(4)>limb position y(3,1)-2
if object position y(4)<limb position y(3,1)+2
if mouseclick()=1
if gaspos$="out"
position object 3,object position x(3)+10,object position y(3),object position z(3)
gaspos$="in"
endif
endif
endif
endif
endif
endif
rem research
rem opening the research panel
if object position x(4)>object position x(8)-1
if object position x(4)<object position x(8)+1
if object position y(4)>object position y(8)-1
if object position y(4)<object position y(8)+1
if mouseclick()=1
if researchpos$="in"
print "nope"
position object 9,-10,0,0
researchpos$="out"
wait 250
endif
endif
endif
endif
endif
endif
rem closing the research panel
if object position x(4)>object position x(8)-1
if object position x(4)<object position x(8)+1
if object position y(4)>object position y(8)-1
if object position y(4)<object position y(8)+1
if mouseclick()=1
if researchpos$="out"
print "yep"
position object 9,100,100,0
if coalresearchpos$="in"
position object 15,200,200,0
coalresearchpos$="out"
endif
if gasresearchpos$="in"
position object 16,100,100,0
gasresearchpos$="out"
endif
if oilresearchpos$="in"
position object 17,100,100,0
oilresearchpos$="out"
endif
researchpos$="in"
wait 250
endif
endif
endif
endif
endif
endif
print researchpos$
rem this is how i got the cooridntates above: print object position y(4)
rem damage
if object position x(4)>object position x(6)-2
if object position x(4)<object position x(6)+2
if object position y(4)>object position y(6)-2
if object position y(4)<object position y(6)+2
if mouseclick()=1
if damagepos$="in"
position object 11,-10,0,0
damagepos$="out"
wait 250
endif
endif
endif
endif
endif
endif
if object position x(4)>object position x(6)-2
if object position x(4)<object position x(6)+2
if object position y(4)>object position y(6)-2
if object position y(4)<object position y(6)+1
if mouseclick()=1
if damagepos$="out"
position object 11,100,100,0
damagepos$="in"
wait 250
endif
endif
endif
endif
endif
endif
rem energy
if object position x(4)>object position x(5)-2
if object position x(4)<object position x(5)+2
if object position y(4)>object position y(5)-2
if object position y(4)<object position y(5)+2
if mouseclick()=1
if energypos$="in"
position object 10,-10,0,0
energypos$="out"
wait 250
endif
endif
endif
endif
endif
endif
if object position x(4)>object position x(5)-2
if object position x(4)<object position x(5)+2
if object position y(4)>object position y(5)-2
if object position y(4)<object position y(5)+2
if mouseclick()=1
if energypos$="out"
position object 10,100,100,0
energypos$="in"
wait 250
endif
endif
endif
endif
endif
endif
rem points
if object position x(4)>object position x(7)-2
if object position x(4)<object position x(7)+2
if object position y(4)>object position y(7)-2
if object position y(4)<object position y(7)+2
if mouseclick()=1
if pointspos$="in"
position object 12,-10,0,0
pointspos$="out"
wait 250
endif
endif
endif
endif
endif
endif
if object position x(4)>object position x(7)-2
if object position x(4)<object position x(7)+2
if object position y(4)>object position y(7)-2
if object position y(4)<object position y(7)+2
if mouseclick()=1
if pointspos$="out"
position object 12,100,100,0
pointspos$="in"
wait 250
endif
endif
endif
endif
endif
endif
rem the writing
rem coal
set text font "arial"
set text size 20
if coalpos$="out"
text object screen x(1)+4,object screen y(1)-160,"coal"
endif
set text size 12
print camera position z(0)
print camera position x(0)
print camera position y(0)
rem gas
rem oil
rem research
rem list
rem coal
text object screen x(9)-118,object screen y(9)-140,"coal technologies"
text object screen x(9)-100,object screen y(9)-100, coal$(1,1)
rem gas
text object screen x(9)-118,object screen y(9)-125,"natural gas"
rem oil
text object screen x(9)-118,object screen y(9)-105,"oil"
rem panels for research
rem coal
rem in
if mouseclick()=1
if object position x(4)>-14.5
if object position x(4)<-12.5
if object position y(4)>2
if object position y(4)<4
if coalresearchpos$="out"
position object 15,object position x(9)+1,object position y(9)-1,-1
coalresearchpos$="in"
endif
rem this is so the coal panel gos over the other research panels
if object position z(16)=-1
position object 16,object position x(16),object position y(16),0
endif
if object position z(17)=-1
position object 17,object position x(17),object position y(17),0
endif
wait 250
endif
endif
endif
endif
endif
rem out
if mouseclick()=1
if object position x(4)>-14.5
if object position x(4)<-12.5
if object position y(4)>2
if object position y(4)<4
if coalresearchpos$="in"
position object 15,200,200,0
coalresearchpos$="out"
wait 250
endif
endif
endif
endif
endif
endif
rem gas
rem in
if mouseclick()=1
if object position x(4)>-14.5
if object position x(4)<-12.5
if object position y(4)>1
if object position y(4)<3
if gasresearchpos$="out"
position object 16,object position x(9)+1,object position y(9)-1,-1
gasresearchpos$="in"
wait 250
endif
endif
endif
endif
endif
endif
rem out
if mouseclick()=1
if object position x(4)>-14.5
if object position x(4)<-12.5
if object position y(4)>1
if object position y(4)<3
if gasresearchpos$="in"
position object 16,100,100,0
wait 250
endif
endif
endif
endif
endif
endif
rem oil
rem in
if object position x(4)>-14.5
if object position x(4)<-12.5
if object position y(4)>0
if object position y(4)<2
if mouseclick()=1
if oilresearchpos$="out"
position object 17,object position x(9)+1,object position y(9)-1,-1
oilresearchpos$="in"
wait 250
endif
endif
endif
endif
endif
endif
rem out
if object position x(4)>-14.5
if object position x(4)<-12.5
if object position y(4)>0
if object position y(4)<2
if mouseclick()=1
if oilresearchpos$="in"
position object 17,50,50,0
oilresearchpos$="out"
wait 250
endif
endif
endif
endif
endif
endif
hide mouse
position object 4,object position x(4)+mousemovex(),object position y(4)-mousemovey(),object position z(4)
control camera using arrowkeys 0,0.5,0.5
if spacekey()=1
position object 4,-13.5,0,object position z(4)
endif
loop