ID:145336
 
Code:
mob/verb/RandomSaying()
var/partone1 = "Your mama's"
var/partone2 = "You're"
var/parttwo3 = "so fat"
var/parttwo4 = "so stupid"
var/partthree5 = "it's not even funny!"
var/partthree6 = "I almost feel sorry for you!"
var/PartOne
var/PartTwo
var/PartThree
PartOne = rand("[partone1]","[partone2]")
PartTwo = rand("[parttwo3]","[parttwo4]")
PartThree = rand("[partthree5]","[partthree6]")
usr<<"This is what the random message was:<br><br>[PartOne] [PartTwo] [PartThree]<br><br>:)<br><br>"


Problem description:
That's what I have, but in the game, all that comes up is:

This is what the random message was:

0 0 0

:)


How do I make it so it shows the message, not 0 0 0?
rand() doesn't work like that. What you want is pick(). Also, you should use lists for the sentance parts.
In response to DarkCampainger
Yeah, I was having trouble with that. I'll try it and tell you what happens.

-NWIM-
In response to Nowatimean
Alright, yeah.
pick() works perfectly. I'll figure out how to make a list later. I'm not sure how to do it. I mean, is it vars or what? Because the way i have right now works, only it gets complicated.
In response to Nowatimean
Lists will make it alot simpler. Here's how a basic list is defined:
var/list/partone = list("Your mama's","You're")


And then to use pick is even simpler:
PartOne = pick(partone)
In response to DarkCampainger
To make it even simpler you could do:

usr<<"This is what the random message was:<br><br>[pick(partone)] [pick(parttwo)] [pick(partthree)]<br><br>:)<br><br>"


If you used lists.
In response to Justin B
Alright, thanks alot, guys.