Begginer Stuck!!

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ::::x::::

    Begginer Stuck!!

    Anyone want to help me with this??
    Even when all condition are met, it drops to the else and doesn't look at
    the if and else if.
    Ie. when bet_in = 1 and rullnum is between 0 and 5, it doesn't work..

    if ( bet_in == 1 && rollnum >= 1 && rollnum <= 4 ) {
    bank = bank + ( betbank * 2 )
    win = betbank * 2
    alert( "You won: $" + win )
    alert( "1 Bank $" + bank ) //debugging
    win = 0 }
    else {
    if ( bet_in == 2 && rollnum >= 5 && rollnum <= 8 ) {
    bank = bank + ( betbank * 2 )
    win = betbank * 2
    alert( "You won: $" + win )
    alert( "2 Bank $" + bank ) //debugging
    win = 0
    betbank = 0
    pick_clickcount = 0
    dep_clickcount = 0
    roll_clickcount = 0 }
    else {
    if ( bet_in == 3 && rollnum >= 9 && rollnum <= 12 ) {
    bank = bank + ( betbank * 2 )
    win = betbank * 2
    alert( "You won: $" + win )
    alert( "3 Bank $" + bank ) //debugging
    win = 0
    betbank = 0
    pick_clickcount = 0
    dep_clickcount = 0
    roll_clickcount = 0 }
    else {
    alert( "You lost: $" + betbank )
    alert( "loose Bank $" + bank ) //debugging
    betbank = 0
    win = 0
    pick_clickcount = 0
    dep_clickcount = 0
    roll_clickcount = 0
    }
    }
    }

    --
    ::::x::::

    "Me fail English, that's unpossible"


  • Janwillem Borleffs

    #2
    Re: Begginer Stuck!!


    "::::x::::" <x@x.com> schreef in bericht news:3f57f4c9@d news.tpgi.com.a u...[color=blue]
    > Anyone want to help me with this??
    > Even when all condition are met, it drops to the else and doesn't look at
    > the if and else if.
    > Ie. when bet_in = 1 and rullnum is between 0 and 5, it doesn't work..
    >[/color]

    With pre-defined bet_in, rollnum, bank and betbank variables, it works fine.
    This means that the logics are okay, but the values within the variables
    aren't.

    How are they retrieved?


    JW



    Comment

    Working...