I know, 24 hours later and I am back for more help. Sorry but I am really stuck with this. I keep getting an illegal image error even though the image is fine and loads ok in the prior function.
Can anyone tell me what I got wrong. I can post the whole code and resources (2 png's) if you need it.
function bullet_setup()
global bullet=20
global current_bullet = 1
global top_bullet = 100
load image "Bullet.png", bullet
for r=bullet to bullet_top
` the next line should place all of the bullets in front of the player ship
` no idea why it doesn't ????
sprite r, sprite x(player)+500, sprite y(player), bullet
next r
ENDFUNCTION
function shoot()
while scancode()=57
if (bullet(current).state=0) and (current<100)
` the program runs OK until I hit the spacebar and then I get
` illegal image number ?????
sprite 20+current, sprite x(player)+300, sprite y(player), bullet
bullet(current).state=1
inc current
if current > bullet_top then current = bullet_top
endif
endwhile
endfunction
Signature removed by moderator. Please do not give out the meaning of life in an open forum.