Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Mouse error in tic tac toe
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Rowah




PostPosted: 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
Sponsor
sponsor
Dan




PostPosted: 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




PostPosted: Tue Jan 06, 2004 9:55 pm   Post subject: (No 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.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: