If I create an associative list such as this
var/list/prizes=list("Large Money Bag"=100,"Medium Money Bag"=50, "Small Money Bag"=10)
Then I can randomly select a prize from the list like this.
var/P = pick(prizes)
usr << "Your Prize is a [P]"
P will be equal to the Key "Large Money Bag" how do I set the value of this key 100 to another variable such as A?
Thanks in advance
-Shwn
ID:178617
Apr 23 2002, 1:11 pm
|
|
Apr 23 2002, 8:29 pm
|
|
var/A = prizes[P]
|