The only thing with your code that I can see is the variables
xpos,ypos will not be updated with the function, or any changes
made with the function will be reset with xpos,ypos.
rem // Set Temporary Variables
xpos = 15
ypos = 400
cls rgb(255,0,0)
get image 1,10,10,50,50,1
SPRITE 1, xpos, ypos, 1
rem // Begin Game Loop
while spacekey()=0
REM // Display text on screen
cls
text 1,1, "Press space key to exit"
SET CURSOR 1,50 : print "FPS: "; screen fps()
SET CURSOR 1,70 : print "x: "; xpos; "y: "; ypos
REM // Position Sprites
SPRITE 1, Sprite X(1), Sprite Y(1), 1
sprite 2, 100,80,1
REM // Make Second Sprite transparent
SET SPRITE alpha 2, 200
REM // Movement Controls
REM F_Spritemove(SP_Number as integer, direction as string, velocity as integer)
if leftkey()=1 then f_spritemove(1,"left",1)
if rightkey()=1 then f_spritemove(1,"right",1)
if upkey()=1 then f_spritemove(1,"up",1)
if downkey()=1 then f_spritemove(1,"down",1)
REM // Sprite Collision Routine
Collide=SPRITE COLLISION(1, 2)
if Collide = 1
text 1,20, "COLLISION DETECTED!!!"
endif
endwhile
function F_Spritemove(SP_Number as integer, direction as string, velocity as integer)
x_position = sprite x(sp_number)
y_position = sprite y(sp_number)
sprite_image = SPRITE IMAGE(sp_number)
select direction
case "up" : y_position = y_position - velocity : endcase
case "down" : y_position = y_position + velocity : endcase
case "left" : x_position = x_position - velocity : endcase
case "right" : x_position = x_position + velocity : endcase
endselect
sprite sp_number, x_position, y_position, sprite_image
endfunction
ToXic.