Pages:
Actions
  • #1 by dawsonsg on 13 Jan 2017
  • Hi Guys,

    Can anyone see what is wrong with the following IF statement?

    IF((first1>=50),1,IF(AND(second2>=50,first1<50),2,IF(AND(third3>=50,second2<50),3,IF(AND(fourth4>=50,third3<50),4,IF(AND(fifth5>=50,fourth4<50),5,IF(AND(sixth6>=50,fifth5<50),6,IF(AND(seventh7>=50,sixth6<50),7,IF(AND(eigth8>=50,seventh7<50),8,IF(AND(ninth9>=50,eigth8<50),9,10)))))))))


    In the trigger log it evaluates to what is below


    IF((first1>=50),1,IF(AND(second2>=50,first1<50),2,IF(AND(third3>=50,second2<50),3,IF(AND(fourth4>=50,third3<50),4,IF(AND(fifth5>=50,fourth4<50),5,IF(AND(sixth6>=50,fifth5<50),6,IF(AND(seventh7>=50,sixth6<50),7,IF(AND(eigth8>=50,seventh7<50),8,IF(AND(ninth9>=50,eigth8<50),9,10))))))))), intermediate:



    IF((44.64285714>=50),1,IF(AND(62.82467532>=50,44.64285714<50),2,IF(AND(77.11038961>=50,62.82467532<50),3,IF(AND(89.30551156>=50,77.11038961<50),4,IF(AND(95.97217823>=50,89.30551156<50),5,IF(AND(99.30551156>=50,95.97217823<50),6,IF(AND(102.24668803>=50,99.30551156<50),7,IF(AND(102.96097374>=50,102.24668803<50),8,IF(AND(ninth9>=50,102.96097374<50),9,10))))))))), final: IF((44.64285714>=50),1,2).
    22:10:01   


    And then set the variable to


    Setting variable RankToBet to IF((44.64285714>=50),1,2).

    Any help would be appreciated.
  • #2 by mcbee on 13 Jan 2017
  • hi
    for some reason the variable  ninth9   has no value , check to make sure that you have spelt it correct in the constant or/and the trigger that gives it a value.
    also if the variables are for the amount of selections the other reason could be that there were only 8 selections so the variable ninth9 could not have a value.

    mcbee
  • #3 by Oxa (WellDoneSoft) on 16 Jan 2017
  • Also, try removing the unnecessary parentheses:

    Turn:

    IF((first1>=50), ...

    Into

    IF(first1>=50, ...
Pages:
Actions