Well, I don't see what could be the problem. It couldn't be the array(0) thing but I'm going to check. And an element is the thing like this:
array(1,2,3,4,5,6,7,8,9,10,11)
right? IF so then thats not what the problem is.
edit: Uhh here's the source:
Rem * Title : Shjp Test
Rem * Author : David B
Rem * Date : today
sync on
hide mouse
nume=1
dim y2(nume)=y
img=1
load image "ship-up.bmp",1
load image "ship-down.bmp",2
load image "ship-left.bmp",3
load image "ship-right.bmp",4
for stars = 1 to 300
dim starx(stars)
dim stary(stars)
next stars
for star2 = 1 to 300
starx(star2)=rnd(640)
stary(star2)=rnd(480)
next star2
white=rgb(255,255,255)
red=rgb(255,0,0)
y=400
x=320
bullettimer=0
do
cls
sprite 1,x,y,img
print bullettimer
if upkey()=1
img=1
y=y-5
endif
if downkey()=1
img=2
y=y+5
endif
if leftkey()=1
img=3
x=x-5
endif
if rightkey()=1
img=4
x=x+5
endif
if spacekey()=1 then bullet=1
rem Here is the problem
rem here is the problem
rem v v v v v v v v (down)
if bullet=1
inc nume,1
inc bullettimer,1
if getyonce=0
y2(nume)=y
getyonce=1
endif
inc nume,1
if getyonce=1 and bullettimer > 10
y2(nume)=y
getyonce=2
endif
inc nume,1
if getyonce=2 and bullettimer > 20
y2(nume)=y
getyonce=3
endif
inc nume,1
if getyonce=3 and bullettimer > 30
y2(nume)=y
getyonce=4
endif
inc nume,1
if getyonce=4 and bullettimer > 40
y2(nume)=y
getyonce=5
endif
y2(nume)=y2(nume)-5
ink red,0
dot x,y2(nume)
endif
if bullettimer>25
getyonce=0
endif
if bullettimer>70
y2=y
bullettimer=0
bullet=0
endif
rem end of problem ^ ^ ^ ^ ^ (end of problem)
if y >=440 then y=440
if downkey()=0 and upkey()=0 and leftkey()=0 and rightkey()=0 then img=1
if x > 640 then x=5
if x <5 then x=640
if y <= 200
if y <100
y=y+5
endif
endif
for star = 1 to 300
stary(star)=stary(star)+1
if stary(star)> 480
starx(star)=rnd(640)
stary(star)=1
endif
ink white,0
dot starx(star),stary(star)
next star
sync
loop
Also, the bullets (which is what I'm having trouble with) isn't quite finished with. I just ran into this error and couldn't get rid of it.
So far though, thanks for your help!
------------------------
Visit my website of Games!
http://dabip.stonerocket.net