Computer Science Canada

Mouse error in tic tac toe

Author:  Rowah [ Tue Jan 06, 2004 9:35 pm ]
Post subject:  Mouse error in tic tac toe

That is some of my code. When i run the program the error i get is "If must be boolean type. Can someone help me out here?
code:
loop
var mx, my, mb, bn : int   
loop   
    Mouse.Where (mx, my, mb)
    buttonchoose ("onebutton")
    buttonwait ("down", mx, my, bn, mb)
    if mb := 1 and mx < 250 and mx > 0 and my < 800 and my > 0 then
    Draw.Text ("X", 125, 162, TIMESNEWROMAN, 0)
    end if
end loop

That is some of my code. When i run the program the error i get is "If must be boolean type. Can someone help me out here?

Author:  Dan [ Tue Jan 06, 2004 9:38 pm ]
Post subject: 

it should be "=" in the if not a ":="

Author:  Rowah [ Tue Jan 06, 2004 9:55 pm ]
Post subject: 

Oops hehe, spent hours figuring that out Embarassed
But one more thing:
Clicked my object and no "X" appears, why not?
*EDIT* Noticed text color is white im sorry.


: