Computer Science Canada

help with moving a cursor!

Author:  DanceMacabre [ Mon May 01, 2006 7:58 pm ]
Post subject:  help with moving a cursor!

I'm trying to move the circle from one spot to another if the user presses the up or down key. why isn't this working?
code:

loop
    loop
        Draw.FillOval (cursorx, cursory, 30, 30, black)
        if KEY_UP_ARROW or KEY_DOWN_ARROW = true then
            cursorx := 300
            cursory := 300
        end if
    end loop
    if KEY_UP_ARROW or KEY_DOWN_ARROW = true then
        cursorx := 60
        cursory := 102
    end if
end loop

I keep getting an error on both my "trues" here saying that operands of comparison operators must be of the same type, but I don;t know how to fix that. Can anyone lend a hand? Much appreciated. Smile

Author:  Tony [ Mon May 01, 2006 8:04 pm ]
Post subject: 

there is just so much wrong with that piece of code that... wow

start by familiarizing yourself with the Turing Walkthrough, you have much to learn

Author:  DanceMacabre [ Mon May 01, 2006 8:20 pm ]
Post subject: 

yeah, I'm getting ahead of myself. It's true lol. Very Happy
tutorial will do me good


: