[personal profile] napoleonherself
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

Date: 2004-12-20 10:34 am (UTC)
From: [identity profile] nidoking.livejournal.com
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.

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

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

Profile

blarg

January 2016

S M T W T F S
     12
3456789
10111213141516
17181920212223
24252627282930
31      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 14th, 2025 11:57 pm
Powered by Dreamwidth Studios