Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
RobMacAF
Apprentice


Joined: 09 Jun 2002
Posts: 186
Location: USA

PostPosted: Fri Jul 11, 2003 7:56 pm   

Logical vs Bit
 
Once again for my dice game I need some help
I have this

#If (@Dice1 == @Dice2 and Dice1 == @DNumber1) {say EVENT!}


It isn't working the way I want. This is how it should be....
If Dice1 is equal to Dice2, and Dice1 is the number you picked before you starting playing (DNumber1) then it should say EVENT!

For some reason this isn't doing that
Reply with quote
RobMacAF
Apprentice


Joined: 09 Jun 2002
Posts: 186
Location: USA

PostPosted: Fri Jul 11, 2003 7:59 pm   
 
Let me put the entire code here. It might help

#If (@Dice1 == @Dice2 and Dice1 == @DNumber1) {say EVENT!} {}

#If (@Dice1 == @Dice2) {say DOUBLES! Roll again!} {#IF (@Dice1 == @DNumber1) {say You got 1 point} {#IF (@Dice2 == @DNumber1) {say You got 1 point}}}

I want the first section in with the rest. In this game a couple things can happen. If you roll double it says Doubles Roll Again, If you roll doubles of your same number it says even, if you roll your number on the first dice or the second dice you get 1 point.

Is there an easier way to do this
Reply with quote
Talahaski
Enchanter


Joined: 10 Oct 2000
Posts: 656
Location: USA

PostPosted: Fri Jul 11, 2003 10:09 pm   
 
How come your using two equal signs (==)?

#If ((@Dice1 = @Dice2) and (@Dice1 = @DNumber1)) {say EVENT~!}


Loojks like Dice1 is missing a @ also
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net