Mouse error in tic tac toe
Author |
Message |
Rowah
|
Posted: 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? |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Dan
|
Posted: Tue Jan 06, 2004 9:38 pm Post subject: (No subject) |
|
|
it should be "=" in the if not a ":=" |
Computer Science Canada
Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more! |
|
|
|
|
Rowah
|
Posted: Tue Jan 06, 2004 9:55 pm Post subject: (No subject) |
|
|
Oops hehe, spent hours figuring that out
But one more thing:
Clicked my object and no "X" appears, why not?
*EDIT* Noticed text color is white im sorry. |
|
|
|
|
|
|
|