
-----------------------------------
TheSecretWaterBender
Thu Jan 06, 2011 11:41 pm

Number choosing program
-----------------------------------
What is it you are trying to achieve?
Im trying to create a program where the user can click on six numbers and each number is displayed and stored (they can't choose the same number twice)


What is the problem you are having?
I cannot click more than once before the program ends

Describe what you have tried to solve this problem
I tried adding another for statement and have no idea as to storing (preferably in an array) or stopping a number (or range from being clicked twice) efficiently


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)



var count:int:=1
var x,y,b:int
var font1: int := Font.New ("Comicsans:25:bold")
for z:0..6
for q:0..6
Draw.Box (20+z*60,320-q*50,80+z*60,370-q*50,blue)
Font.Draw(intstr(q*7+(z+1)),35+z*60,335-q*50, font1, red)
end for
end for
for z:0..6
for q:0..6
loop
Mouse.Where(x,y,b) 
if b = 1
then
if x>20+z*60 and x320-q*50 and y20+z*60 and x320-q*50 and y 1 then
            for p : 1 .. 5
                if p not= s and p < s then
                    if a (s) = a (p) then
                        put "You cannot guess the same number twice"
                        else 
                    end if
                end if
            end for
            end if
        Draw.FillBox(20+z*60,320-q*50,80+z*60,370-q*50,blue)
end if
        end if
        exit when b=1
end loop
end for
end for
delay (300)
end for

