ID:270373
 
Ok i was wondering how would i go about makeing a var such as
var/hand1=rand(1,11)

be recalled or made to do the rand() agin after i have done used the var once?
I don't really know what you mean, but I'll shoot.
var/hand1
world/New()
..()
hand1=rand(1,11)


Try that.
In response to Hell Ramen
well not realy what i was looking for but i dont know how to explain what im trying to do so ill show the code i am needing it on.
mob/verb/Black_Jack()
var/card1=rand(1,11)
var/card2=rand(1,11)
var/dealer1=rand(1,11)
var/dealer2=rand(1,11)

see in my blackjack game i am needing it to recreate the same var sevral times. but i have no clue on how to go about doing this.
In response to National Guardsmen
Is this what you needed?

proc/changed_hand()
hand=rand(number,anothernumber)

var/hand
In response to National Guardsmen
So you want each of those re-defined somewhere else in that verb? If so:
mob/verb/Black_Jack()
var/card1=rand(1,11)
var/card2=rand(1,11)
var/dealer1=rand(1,11)
var/dealer2=rand(1,11)
//Code here
...
card1=rand(1,11) // re-defines the var, same goes for the rest of the vars below here.
card2=rand(1,11)
dealer1=rand(1,11)
dealer2=rand(1,11)


O-matic