Hello, I think this is a very basic question but I don’t know how to find the answer.
I make variables for color:
col1 = 128
col2 = 45
col3 = 89
and then I put them together
colo= col1col2col3
to put them into the fill command but I need commas fill(128,45,89)
If I do it this way: colo= col1,col2,col3 it wont work (it just takes the first numbers, before comma) and I know why, because (the comma is a string?) however, no number.
Edit
Ok, I can use
COLOR = col1,col2,col3
This seemed to be a solution (I don’t get an error) but it just takes the first value, so there is still something wrong.
Edit
Ok, it works via
color( , , , ,)
What I don’t understand in the reference is that I should have to int color.r g and b, but this seems to work automatically and if I put this in the setup, I get errors
For what is COLOR good for? It’s not listed in the reference, so is it obsolete or dead?
@bllr When you do COLOR=col1,col2,col3 you’re creating a variable named COLOR and assigning whatever col1 is to COLOR.
As for color.r, not everything you see in the reference is legit. A lot of changes have been made to Codea over the years and the reference hasn’t been updated exactly to reflect everything.
@bllr It all depends if the command supports the use of commas. You can set variables with values and commas by doing var1,var2,var3=23,56,23 . But as for other things, look at the code in the Examples and Craft folders and see how thing are done in those programs to get ideas.