Expecting DOT, found 'cols'
in
Programming Questions
•
2 years ago
I get this error:
Expecting DOT, found 'cols'
on this line:
color[] cols = {
why, it's basicly the colorwheel example that get's delivered with processing.
Expecting DOT, found 'cols'
on this line:
color[] cols = {
why, it's basicly the colorwheel example that get's delivered with processing.
- int steps = 1;
void setup() {
size(800, 20);
color[] cols = {
color(255-(255/steps)*j, 255-(255/steps)*j, 0),
color(255-(255/steps)*j, (255/1.5)-((255/1.5)/steps)*j, 0),
color(255-(255/steps)*j, (255/2)-((255/2)/steps)*j, 0),
color(255-(255/steps)*j, (255/2.5)-((255/2.5)/steps)*j, 0),
color(255-(255/steps)*j, 0, 0),
color(255-(255/steps)*j, 0, (255/2)-((255/2)/steps)*j),
color(255-(255/steps)*j, 0, 255-(255/steps)*j),
color((255/2)-((255/2)/steps)*j, 0, 255-(255/steps)*j),
color(0, 0, 255-(255/steps)*j),
color(0, 255-(255/steps)*j, (255/2.5)-((255/2.5)/steps)*j),
color(0, 255-(255/steps)*j, 0),
color((255/2)-((255/2)/steps)*j, 255-(255/steps)*j, 0)
}
//for (int j = 0; j < steps; j++) {
//println("255-(255/steps)*j, 255-(255/steps)*j, 0");
//println("\t "+(255-(255/steps)*j)+"\t "+(255-(255/steps)*j)+"\t "+(0));
}
//}
void draw() {
for (int i = 0; i < cols.length; i++) {
fill(cols[i]);
rect(0, i*20, 20, 20);
}
}
1