setSpriteZPos() throws an error:
whenever I'm trying to bring to front (0) the sprite which is already in front or moving to the back (1) when the sprite is already at the back.Wrong usage/parameters for this command!
Read the documentation!
For example:
Code: Select all
SetFillStyle(#FILLCOLOR)
CreateBrush(0,100,100,#WHITE)
CreateSprite(0,#BRUSH,0)
DisplaySprite(0,0,0)
CreateBrush(1,100,100,#RED)
CreateSprite(1,#BRUSH,1)
DisplaySprite(1,50,50)
SetSpriteZPos(0,1) ; this line produces error msg. Changing to (1,0) gives an error as well
WaitKeyDown("any")