LandedOn() //if you stop on this tile, it will run the following proc
var/q = rand("You inherit $100!","Doctor's Fee. Pay $50.","Pay Hospital $100","Go to jail!","Pay School tax of $150."/*,"Christmas fund matures. Collect $100","Income tax refund. Collect $20","Life insurance matures. Collect $100."*/)
if(q=="You inherit $100!")
usr << "You inherit $100!"
usr.money += 100
(returnPlayers()-usr) << "[usr] inheritted $100!"
return
if(q=="Doctor's Fee. Pay $50.")
usr << "Doctor's Fee. Pay $50."
usr.money -= 50
(returnPlayers()-usr) << "[usr] had to pay $50 for the doctor!"
return
if(q=="Pay Hospital $100")
usr << "You pay the hopsital $100!"
usr.money -= 100
(returnPlayers()-usr) << "[usr] pays the hospital $100!"
return
if(q=="Go to jail!")
usr.jail = 1
usr.loc = locate(1,1,1)
(returnPlayers()-usr) << "[usr] was sent to jail by the Community Chest!"
usr << "You get sent to jail after drawing the card!"
return
if(q=="Pay School tax of $150.")
usr << "You pay a school tax of $150."
usr.money -= 150
(returnPlayers()-usr) << "[usr] payed a school tax of $150."
return
I get the following error codes when compiling, and I'm pretty sure it's a complete noobs mistake...
turfs.dm:53:error:rand:undefined proc
turfs.dm:54:error::invalid expression
turfs.dm:53:q :warning: variable defined but not used
http://www.byond.com/docs/ref/info.html#/proc/pick