Page 1 of 1

Turing Help

Posted: Tue Mar 16, 2004 9:17 am
by KukuriChan
I'm suppose to be doing a dice game during this break but there's something wrong with my program. See, I have a problem with my code. When you choose the play button, it loads the screen instantly but then it goes right to the procedure that tells you how to play and then goes to the next procedure. How do you make it so that the procedure is only active when you choose it? I tried putting it in the conditional loop but there was an error when I did that. :( If anybody can help me I'll be really happy.

Code: Select all

loop
    if Mouse.ButtonMoved ("up") then
        Mouse.ButtonWait ("down", x, y, buttonnumber, buttonupdown)
        if x >= 220 and x <= 300 and y >= 100 and y <= 130 then
            delay (300)
            cls
            Pic.ScreenLoad ("chess-game-carpet600.jpg", 0, 0, picXor)
            exit
        elsif x < 220 and x > 300 and y < 100 and y > 130 then
            return     % goes back to the beginning if out of range of button
        end if
        if x >= 320 and x <= 400 and y >= 100 and y <= 130 then
            exit
        elsif x < 320 and x > 400 and y < 100 and y > 130 then
            return
        end if
        if x >= 420 and x <= 500 and y >= 100 and y <= 130 then
            delay (400)
            Window.Select (helpWindow)
        elsif x < 420 and x > 500 and y < 100 and y < 130 then
            return
        end if
    end if
end loop

drawfillbox (maxx, 0, 600, maxy, grey)
Font.Draw ("Menu", 550, 600, button, 0)
include "proc howtoplay.t"
include "N ame.t"
[code] 

[color=#888888][size=85]Archived topic from Iceteks,  old topic ID:2147, old post ID:18257[/size][/color]

Turing Help

Posted: Tue Mar 16, 2004 11:40 pm
by syb
Well. I haven't done anything in turing for a bit so... i'll have to think on it. just one thing. Is that all you code if not can you give all of it to me?

Archived topic from Iceteks, old topic ID:2147, old post ID:18277

Turing Help

Posted: Thu Apr 01, 2004 2:02 am
by Fat Cat
is the syntax of some your conditional checks appears odd ?;

EG;

elsif x < 320 and x > 400 and y < 100 and y > 130 then
return


[ x can't be <320 AND >400 at the same time can it ? should this be an OR ]


elsif x < 420 and x > 500 and y < 100 and y < 130 then
return


[ x can't be <420 AND >500 at the same time can it ? should this also be an OR statement ]


Archived topic from Iceteks, old topic ID:2147, old post ID:18642

Turing Help

Posted: Sun Oct 10, 2004 10:23 pm
by Death
Wow, that isn't gonna help me very much. The code displayed IS helpful, but I gotta see what's in the INCLUDE statements as well. More than likely the problem exists in one of those files (Darn Turing, can't even surpass 3000 lines of code without an include statement.) How pitiful.

Archived topic from Iceteks, old topic ID:2147, old post ID:22441