
-----------------------------------
m6435
Wed Jun 07, 2017 9:09 am

help just starting to code for school cant figure out why wont work
-----------------------------------
so i have to code a game and i haven't been coding that long so please dont judge just cant figure out what to do please help 
sorry if unorganized

var x, y, life, amount, Enter : int
var chars : array char of boolean
var y1, y2, x1, x2, un : int
var x_size := 1080
var y_size := 720
View.Set ("graphics:" + intstr (x_size) + "," + intstr (y_size))

x1 := 470
y1 := 60
x2 := 500
y2 := 50


life := 2
y := 90
x := 110
amount := 0
locate (10, 40)
put "dont rush take your time things can kill you easy"

locate (20, 40)
put "use the arrow keys to move around"

locate (30, 40)
put "you only get 3 lives, good luck"
locate (1, 10)
put " Enter the number 1 to start"
get Enter
if Enter = 1 then
    cls
    loop

        put y1, " ", y2

        locate (2, 2)
        put life
        put "x ", x
        put "y ", y

        Draw.Box (75, 50, 1040, 700, red)

        Input.KeyDown (chars)
        drawoval (x, y, 10, 10, 1)

        if chars (KEY_RIGHT_ARROW) then
            delay (35)
            cls
            x := x + 10
            if x >= 1040 then
                x := x - 10
                if x := x1 then
                    life := life - 1
                end if
            end if
            if chars (KEY_LEFT_ARROW) then
                delay (18)
                cls
                x := x - 5
                if x = 130 and x < 515 then
                    y := y - 10

                end if
            end if
            if chars (KEY_DOWN_ARROW) then
                delay (35)
                cls
                y := y - 10
                if y = 1040 then
                            x := x - 10
                        end if
                    end if
                    if chars (KEY_LEFT_ARROW) then
                        delay (18)
                        cls
                        x := x - 5
                        if x = 130 and x < 515 then
                            y := y - 10

                        end if
                    end if
                    if chars (KEY_DOWN_ARROW) then
                        delay (35)
                        cls
                        y := y - 10
                        if y = 1040 then
                x := x - 10
            end if
        end if
        if chars (KEY_LEFT_ARROW) then
            delay (18)
            cls
            x := x - 5
            if x = 130 and x < 515 then
                y := y - 10

            end if
        end if
        if chars (KEY_DOWN_ARROW) then
            delay (35)
            cls
            y := y - 10
            if y 