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

Username:   Password: 
 RegisterRegister   
 Turing Game Help Needed [Problem with using the Larger Than and Smaller Than Signs (<,>)
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
sliverofshadows475




PostPosted: Wed Dec 24, 2008 12:03 pm   Post subject: Turing Game Help Needed [Problem with using the Larger Than and Smaller Than Signs (<,>)

Hey guys, I'm having a bit of trouble with the Smaller and Bigger Than signs.

Here's the part I need help with.

My Code:
Turing:

    if health1 = 0 then
        drawbox (50,300,125,350,0)
        score +=500000
    end if 


What I would like to do:

Turing:

    if health1 = <0 then
        drawbox (50,300,125,350,0)
        score +=500000
    end if 


It's on lines 1434-1437. The thing is, Turing won't allow me to use the < sign. I want it to drawbox when the health is 0 or lower.

How could I fix this?

Any help would be appreciated. Thanks in advance.



Alien Attack!.t
 Description:

Download
 Filename:  Alien Attack!.t
 Filesize:  30.39 KB
 Downloaded:  61 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Insectoid




PostPosted: Wed Dec 24, 2008 12:09 pm   Post subject: RE:Turing Game Help Needed [Problem with using the Larger Than and Smaller Than Signs (<,>)

The proper operator is <=. 'if this is less than or equal to that, do this'.
sliverofshadows475




PostPosted: Wed Dec 24, 2008 12:10 pm   Post subject: Re: Turing Game Help Needed [Problem with using the Larger Than and Smaller Than Signs (<,>)

Thank you very much, exactly what I needed! Very Happy
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: