blarg ([personal profile] napoleonherself) wrote2004-12-20 12:39 pm

blerg, eat MUXcode

I wonder why it is that this talking rainbow-colored dummy responds to a @switch rand(insert number here) with "always do the last option, no matter how many there are, and no matter what the last option actually is". THAT IS NOT WHAT RAND() DOES YOU STUPID THING

[identity profile] nidoking.livejournal.com 2004-12-20 10:34 am (UTC)(link)
Did you srand() or seed() or whatever first? Print what random numbers you're getting and make sure that if you need a break or something between cases, it's there. If the switch is storing something to a variable and you're trickling down through all the cases, it'll always have the last value in the list.

[identity profile] chrisxk.livejournal.com 2004-12-20 12:05 pm (UTC)(link)
MUXcode doesn't have srand() or seed()... or variables, for that matter, really.

[identity profile] chrisxk.livejournal.com 2004-12-20 12:11 pm (UTC)(link)
(The problem turned out to be a missing comma)