I have a could not close nest error on the last line. Usually i just forgot a loop after my do. HOwever, this time i couldn\'t locate a problem. ANy help would be appreciated. Also any other feedback on my game would be cool.
hide mouse
sync on : sync rate 60
randomize timer()
load image \"E:\\nutrun\\pictures\\texture.bmp\",1
Print \"Level 1\"
REM Level 1
rem controled object
make object cube 1,1
position object 1,2,1.51,5
yrotate object 1,90
color object 1,rgb(255,0,0)
rem walls and ground
make object box 2,1000,1,1000
texture object 2,1
make object box 3,1,20,40
position object 3,0,2,30
texture object 3,1
make object box 4,40,20,1
position object 4,20,2,0
texture object 4,1
make object box 5,1,20,40
position object 5,40,2,30
texture object 5,1
make object box 6,40,20,1
position object 6,20,2,50
texture object 6,1
make object box 7,20,20,1
position object 7,10,2,40
texture object 7,1
make object box 8,1,20,20
position object 8,20,2,30
texture object 8, 1
make object box 9,1,20,20
position object 9,10,2,20
texture object 9,1
make object box 10,1,20,20
position object 10,20,2,30
texture object 10,1
make object box 11,20,20,1
position object 11,20,2,10
texture object 11,1
make object box 12,1,20,40
position object 12,30,2,20
texture object 12,1
make object box 1000,1,5,10
position object 1000,0,0,5
hide object 1000
make object box 1001,1,5,10
position object 1001,40,0,5
hide object 1001
rem sky
color backdrop 1000
rem collision
set object collision to boxes 2
rem main loop
do
rem level 1 print
center text 320,15,\"Level 1\" : set text to bold : set text size 30
rem controls
aY# = object angle Y(1)
if upkey()=1 then move object 1,0.4
if downkey()=1 then move object 1,-0.4
if rightkey()=1 then aY# = wrapvalue(aY#+3)
if leftkey()=1 then aY# = wrapvalue(aY#-3)
yrotate object 1,aY#
rem collision stats
if object collision(1,1001)
wait 1500
delete object 3
delete object 4
delete object 5
delete object 6
delete object 7
delete object 8
delete object 9
delete object 10
delete object 11
delete object 12
endif
if object collision(1,0) then position object 1,X1#,1.51,Z1#
rem camera
X1# = Object position x(1)
Z1# = Object position z(1)
X# = Newxvalue(X1#,aY#-180,5)
Z# = Newzvalue(Z1#,aY#-180,5)
Position Camera X#,4,Z#
Point camera X1#,3,Z1#
if controlkey()=1 then Position Camera X#,64,Z# : Point camera X1#,48,Z1#
inc count
if count=30
for c = 2 to 12
which=rnd(5)
if count=30 then count=0
sync
gosub L2
REM Level 2
L2:
Print \"Level 2\"
rem controled object
make object cube 1,1
position object 1,2,1.51,5
yrotate object 1,90
color object 1,rgb(255,0,0)
rem walls and ground
make object box 2,1000,1,1000
texture object 2,1
make object box 3,1,20,40
position object 3,0,2,30
texture object 3,1
make object box 4,40,20,1
position object 4,20,2,0
texture object 4,1
make object box 5,1,20,40
position object 5,40,2,30
texture object 5,1
make object box 6,40,20,1
position object 6,20,2,50
texture object 6,1
make object box 7,20,20,1
position object 7,10,2,40
texture object 7,1
make object box 8,1,20,20
position object 8,20,2,30
texture object 8, 1
make object box 9,1,20,20
position object 9,10,2,20
texture object 9,1
make object box 10,1,20,20
position object 10,20,2,30
texture object 10,1
make object box 11,20,20,1
position object 11,20,2,10
texture object 11,1
make object box 12,1,20,40
position object 12,30,2,20
texture object 12,1
make object box 1000,1,5,10
position object 1000,0,0,5
hide object 1000
make object box 1001,1,5,10
position object 1001,40,0,5
hide object 1001
rem sky
color backdrop 1000
rem collision
set object collision to boxes 2
rem main loop
do
rem level 2 print
center text 320,15,\"Level 2\" : set text to bold : set text size 30
rem controls
aY# = object angle Y(1)
if upkey()=1 then move object 1,0.4
if downkey()=1 then move object 1,-0.4
if rightkey()=1 then aY# = wrapvalue(aY#+3)
if leftkey()=1 then aY# = wrapvalue(aY#-3)
yrotate object 1,aY#
rem collision stats
if object collision(1,1001)
wait 1500
delete object 3
delete object 4
delete object 5
delete object 6
delete object 7
delete object 8
delete object 9
delete object 10
delete object 11
delete object 12
endif
if object collision(1,0) then position object 1,X1#,1.51,Z1#
rem camera
X1# = Object position x(1)
Z1# = Object position z(1)
X# = Newxvalue(X1#,aY#-180,5)
Z# = Newzvalue(Z1#,aY#-180,5)
Position Camera X#,4,Z#
Point camera X1#,3,Z1#
if controlkey()=1 then Position Camera X#,64,Z# : Point camera X1#,48,Z1#
inc count
if count=30
for c = 2 to 12
which=rnd(5)
if count=30 then count=0
sync
gosub L3
REM Level 3
L3:
Print \"Level 3\"
rem controled object
make object cube 1,1
position object 1,2,1.51,5
yrotate object 1,90
color object 1,rgb(255,0,0)
rem walls and ground
make object box 2,1000,1,1000
texture object 2,1
make object box 3,1,20,40
position object 3,0,2,30
texture object 3,1
make object box 4,40,20,1
position object 4,20,2,0
texture object 4,1
make object box 5,1,20,40
position object 5,40,2,30
texture object 5,1
make object box 6,40,20,1
position object 6,20,2,50
texture object 6,1
make object box 7,20,20,1
position object 7,10,2,40
texture object 7,1
make object box 8,1,20,20
position object 8,20,2,30
texture object 8, 1
make object box 9,1,20,20
position object 9,10,2,20
texture object 9,1
make object box 10,1,20,20
position object 10,20,2,30
texture object 10,1
make object box 11,20,20,1
position object 11,20,2,10
texture object 11,1
make object box 12,1,20,40
position object 12,30,2,20
texture object 12,1
make object box 1000,1,5,10
position object 1000,0,0,5
hide object 1000
make object box 1001,1,5,10
position object 1001,40,0,5
hide object 1001
rem sky
color backdrop 1000
rem collision
set object collision to boxes 2
rem main loop
do
rem level 3 print
center text 320,15,\"Level 3\" : set text to bold : set text size 30
rem controls
aY# = object angle Y(1)
if upkey()=1 then move object 1,0.4
if downkey()=1 then move object 1,-0.4
if rightkey()=1 then aY# = wrapvalue(aY#+3)
if leftkey()=1 then aY# = wrapvalue(aY#-3)
yrotate object 1,aY#
rem collision stats
if object collision(1,1001)
wait 1500
delete object 3
delete object 4
delete object 5
delete object 6
delete object 7
delete object 8
delete object 9
delete object 10
delete object 11
delete object 12
endif
if object collision(1,0) then position object 1,X1#,1.51,Z1#
rem camera
X1# = Object position x(1)
Z1# = Object position z(1)
X# = Newxvalue(X1#,aY#-180,5)
Z# = Newzvalue(Z1#,aY#-180,5)
Position Camera X#,4,Z#
Point camera X1#,3,Z1#
if controlkey()=1 then Position Camera X#,64,Z# : Point camera X1#,48,Z1#
inc count
if count=30
for c = 2 to 12
which=rnd(5)
if count=30 then count=0
sync
gosub L4
REM Level 4
L4:
Print \"Level 4\"
rem controled object
make object cube 1,1
position object 1,2,1.51,5
yrotate object 1,90
color object 1,rgb(255,0,0)
rem walls and ground
make object box 2,1000,1,1000
texture object 2,1
make object box 3,1,20,40
position object 3,0,2,30
texture object 3,1
make object box 4,40,20,1
position object 4,20,2,0
texture object 4,1
make object box 5,1,20,40
position object 5,40,2,30
texture object 5,1
make object box 6,40,20,1
position object 6,20,2,50
texture object 6,1
make object box 7,20,20,1
position object 7,10,2,40
texture object 7,1
make object box 8,1,20,20
position object 8,20,2,30
texture object 8, 1
make object box 9,1,20,20
position object 9,10,2,20
texture object 9,1
make object box 10,1,20,20
position object 10,20,2,30
texture object 10,1
make object box 11,20,20,1
position object 11,20,2,10
texture object 11,1
make object box 12,1,20,40
position object 12,30,2,20
texture object 12,1
make object box 1000,1,5,10
position object 1000,0,0,5
hide object 1000
make object box 1001,1,5,10
position object 1001,40,0,5
hide object 1001
rem sky
color backdrop 1000
rem collision
set object collision to boxes 2
rem main loop
do
rem level 4 print
center text 320,15,\"Level 4\" : set text to bold : set text size 30
rem controls
aY# = object angle Y(1)
if upkey()=1 then move object 1,0.4
if downkey()=1 then move object 1,-0.4
if rightkey()=1 then aY# = wrapvalue(aY#+3)
if leftkey()=1 then aY# = wrapvalue(aY#-3)
yrotate object 1,aY#
rem collision stats
if object collision(1,1001)
wait 1500
delete object 3
delete object 4
delete object 5
delete object 6
delete object 7
delete object 8
delete object 9
delete object 10
delete object 11
delete object 12
endif
if object collision(1,0) then position object 1,X1#,1.51,Z1#
rem camera
X1# = Object position x(1)
Z1# = Object position z(1)
X# = Newxvalue(X1#,aY#-180,5)
Z# = Newzvalue(Z1#,aY#-180,5)
Position Camera X#,4,Z#
Point camera X1#,3,Z1#
if controlkey()=1 then Position Camera X#,64,Z# : Point camera X1#,48,Z1#
inc count
if count=30
for c = 2 to 12
which=rnd(5)
if count=30 then count=0
sync
gosub L5
REM Level 5
L5:
Print \"Level 5\"
rem controled object
make object cube 1,1
position object 1,2,1.51,5
yrotate object 1,90
color object 1,rgb(255,0,0)
rem walls and ground
make object box 2,1000,1,1000
texture object 2,1
make object box 3,1,20,40
position object 3,0,2,30
texture object 3,1
make object box 4,40,20,1
position object 4,20,2,0
texture object 4,1
make object box 5,1,20,40
position object 5,40,2,30
texture object 5,1
make object box 6,40,20,1
position object 6,20,2,50
texture object 6,1
make object box 7,20,20,1
position object 7,10,2,40
texture object 7,1
make object box 8,1,20,20
position object 8,20,2,30
texture object 8, 1
make object box 9,1,20,20
position object 9,10,2,20
texture object 9,1
make object box 10,1,20,20
position object 10,20,2,30
texture object 10,1
make object box 11,20,20,1
position object 11,20,2,10
texture object 11,1
make object box 12,1,20,40
position object 12,30,2,20
texture object 12,1
make object box 1000,1,5,10
position object 1000,0,0,5
hide object 1000
make object box 1001,1,5,10
position object 1001,40,0,5
hide object 1001
rem sky
color backdrop 1000
rem collision
set object collision to boxes 2
rem main loop
do
rem level 5 print
center text 320,15,\"Level 5\" : set text to bold : set text size 30
loop
rem controls
aY# = object angle Y(1)
if upkey()=1 then move object 1,0.4
if downkey()=1 then move object 1,-0.4
if rightkey()=1 then aY# = wrapvalue(aY#+3)
if leftkey()=1 then aY# = wrapvalue(aY#-3)
yrotate object 1,aY#
rem collision stats
if object collision(1,1001)
wait 1500
delete object 3
delete object 4
delete object 5
delete object 6
delete object 7
delete object 8
delete object 9
delete object 10
delete object 11
delete object 12
endif
if object collision(1,0) then position object 1,X1#,1.51,Z1#
rem camera
X1# = Object position x(1)
Z1# = Object position z(1)
X# = Newxvalue(X1#,aY#-180,5)
Z# = Newzvalue(Z1#,aY#-180,5)
Position Camera X#,4,Z#
Point camera X1#,3,Z1#
if controlkey()=1 then Position Camera X#,64,Z# : Point camera X1#,48,Z1#
inc count
if count=30
for c = 2 to 12
which=rnd(5)
if count=30 then count=0
end
wait key
Thanks,
Nathan
You are entering the Wu Dynasty. Boomshakalaka
-Nathan