ID:266321
 
in need help with list. I want it to hold variables randomly rolled (have the random part) and display them to the usr as a switch statment and the user picks one and it get deleted off the list.
Thanks,
Air _King
Air _King wrote:
in need help with list. I want it to hold variables randomly rolled (have the random part) and display them to the usr as a switch statment and the user picks one and it get deleted off the list.

mob/verb/roll()
var/num1 = rand(1,6)
var/num2 = rand(1,6)
var/num3 = rand(1,6)
var/list/L
L += num1
L += num2
L += num3
var/choice = input("What number?") in L
L -= choice
for(var/T in L)
usr << "[T] is still in list."

Kinda long, but you get the point.