Are you using Pro or Classic?
If you are using Pro, try this instead:
sync on
sync rate 60
#constant STEPSIZE 10
` Draw a shape and capture it to an image
ink rgb(255,255,255),0
box 0,0,16,16
get image 1,0,0,16,16
` Set up the sprite to display it
sprite 1,100,100,1
offset sprite 1,7,7
Steps=0
do
cls
` If the mouse button has been pressed ...
if mouseclick() > 0
` Get the target coordinates
TargetX=mousex()
TargetY=mousey()
` Work out how many steps are required to get there
Steps=sqrt( ((TargetX-sprite x(1))^2) + ((TargetY-sprite y(1))^2) )/STEPSIZE
` Work out the angle to get there
Angle=atanfull( TargetX-sprite x(1), sprite y(1)-TargetY )
` Rotate the sprite to that angle
rotate sprite 1, Angle
endif
` If the bullet still has steps to make ...
if Steps > 0
if Steps > 1
` and it's not the final step, just move it
move sprite 1, 10
else
` otherwise position the sprite at the final coordinates
sprite 1, TargetX, TargetY, sprite image(1)
endif
` reduce the number of steps still to take
dec Steps
endif
text 0,0,"Sprite X : " + str$( sprite x(1) ) + ", Sprite Y : " + str$( sprite y(1) )
sync
loop
I didn't have the time to do the movement calculations myself, so I'm using ROTATE SPRITE and MOVE SPRITE instead.