
-----------------------------------
Sean
Wed Dec 05, 2007 2:43 pm

RBG - Still Needs Work, But Begining
-----------------------------------

for i : 1 .. 255
    for x : 1 .. 1
        for y : 1 .. 1
            put i
            drawfillbox ((x * 24), (y * 24), (x * 24) + 24, (y * 24) + 24, i)
            end for
    end for
end for


Still needs word, need to get a scroll bar so you can look at what was before. Still working, this is just the test one that I made.

~Sean

-----------------------------------
Clayton
Wed Dec 05, 2007 3:34 pm

RE:RBG - Still Needs Work, But Begining
-----------------------------------
Ask yourself, what value will x and y have every time you run the program? I think you will see some extremely extraneous code there.

-----------------------------------
Sean
Wed Dec 05, 2007 7:12 pm

Re: RBG - Still Needs Work, But Begining
-----------------------------------
Yes, I know they all equal 24, thats just perametor size, I could change, but will have to do tomorrow. The other values = 48.


for i : 1 .. 255 
    for x : 1 .. 1 
        for y : 1 .. 1 
            put i 
            drawfillbox ( 24 ,  24 , 24  + 24,  24 + 24, i) 
            end for 
    end for 
end for 


-----------------------------------
Clayton
Wed Dec 05, 2007 7:26 pm

RE:RBG - Still Needs Work, But Begining
-----------------------------------
How many times does:


for x : 1 .. 1
   ...
end for


iterate for?

-----------------------------------
Carey
Thu Dec 06, 2007 12:55 pm

Re: RBG - Still Needs Work, But Begining
-----------------------------------
Why don't you try:

for i : 1 .. 255
    put i
    drawfillbox (24, 24, 48, 48, i)
end for

-----------------------------------
LaZ3R
Thu Dec 06, 2007 2:54 pm

RE:RBG - Still Needs Work, But Begining
-----------------------------------
the x and y for loops are doing nothing. The number is constantly 24 and 48 respectively...

The only use in that would be if the value of x or y was NOT constant and changed each time through the loop.

for i : 1 .. 255 
    for x : 1 .. 2
        for y : 1 .. 2
            put i 
            drawfillbox ((x * 24), (y * 24), (x * 24) + 24, (y * 24) + 24, i) 
            end for 
    end for 
end for 

Try that and see what your code will do.

-----------------------------------
Sean
Thu Dec 06, 2007 3:21 pm

Re: RBG - Still Needs Work, But Begining
-----------------------------------
I was using a grid system that I created before, and then just added 1s. It creates 2 boxes, if it has 2.

-----------------------------------
Zampano
Thu Dec 06, 2007 4:21 pm

Re: RBG - Still Needs Work, But Begining
-----------------------------------
Why not this instead?
colour (0)
for c:1..255
    colourback(c)
    put " ",c," "..
end for

-----------------------------------
Sean
Fri Dec 07, 2007 10:24 am

Re: RBG - Still Needs Work, But Begining
-----------------------------------
As I said, I made it quickly and would make a new one.

Still working on a better one, coming soon.
