You Shouldn't have the 'Select Case Position' instead you should have Form2.Picture as an array
player2_position = rolldice(player2_position)
allows you to pass the current position of each player into the rolldice routine, the rolldice routine will then take the the value rolled and add it to the current positon, and then pass the new position out into the current position
ex. player1 is at position 5, and then rolls a 6, 5 gets passed into the rolldice routine, 6 gets added to 5 and then player1 position is set to 11.
Form2.Picture(player1_position).Picture = player1_image
will then put the player1_image on the 11th element of the array, making it move six spots.




Reply With Quote