So every time I walk through a door, I want to be taken to a random play field. There are 8 play fields in the game and they are named "1","2","3","4","5","6","7","8"
This section of my code looks like this: if player0x>160 then a=(rand/32)+1
if a=1 then gosub 1
if a=2 then gosub 2
if a=3 then gosub 3
if a=4 then gosub 4
if a=5 then gosub 5
if a=6 then gosub 6
if a=7 then gosub 7
if a=8 then gosub 8
Is there any way to simplify this to save space? I know there has to be a way but I can't get anything to work. Thank you for your help.