Re: if if else help plase
}else if (noofstays >5 && noofstays<9){//nb say ;expected
Re: if if else help plase
Quote:
Originally Posted by
Addez
}else if (noofstays >5 && noofstays<9){//nb say ;expected
yes but ;doesint belong here i have done other if statements to try it out and make sure im not crazy the syntax seem right
this is a pain
i have allso tryed puting ; at end inside and outside brackets--no work
Re: if if else help plase
}else if (noofstays >5 && noofstays<9){
this is the solution.
You wrote:
}else if (noofstays >5 && <9){
You should have written:
}else if (noofstays >5 && noofstays<9){
Thats the solution.
Re: if if else help plase
Can you supply the whole method?
And make sure it is in [code] tags [/code].
That sort of error is almost always down to a misplaced bracket, or ;, so make sure your code is formatted correctly (Netbeans can do this for you).
Re: if if else help plase
Ah.
Oh well, I never read unformatted code...:)
Re: if if else help plase
thanks
}else if (noofstays >5 && noofstays<9){
that did it