I Dont know if this is a bug or I am doing something that I should not.
in
Programming Questions
•
3 months ago
Hi.
When I run the program like this:
When I run the program like this:
String[] date = new String[6];
date[0] = String.valueOf(year());
date[1] = String.valueOf(month());
date[2] = String.valueOf(day());
date[3] = String.valueOf(hour());
date[4] = String.valueOf(minute());
date[5] = String.valueOf(second());
String joineddate = join(date, " ");
int dwidth = 600;
int dheight = 600;
float radiomax = 500;
int colorselector;
int nofcircles =234;
void setup()
{
size(dwidth, dheight);
background (255);
noLoop();
}
void draw()
{
for (float loop = radiomax; loop >= 0 ; loop = loop - (radiomax /nofcircles))
{
colorselector = colorselector + 1;
if (colorselector % 2 == 0)
{fill (255);}
else
{fill (0);}
noStroke();
ellipse((dwidth/2), (dheight/2), loop, loop);}
saveFrame(joineddate);
}
I do get some token error pointing to the [ in this: date[0] = String.valueOf(year());
If I run only this:
String[] date = new String[6];
date[0] = String.valueOf(year());
date[1] = String.valueOf(month());
date[2] = String.valueOf(day());
date[3] = String.valueOf(hour());
date[4] = String.valueOf(minute());
date[5] = String.valueOf(second());
String joineddate = join(date, " ");
It runs alright.
I already tried this in Processing 2.0.1, 1.5.x and 1.2.x. and it gives the same results.
Thanks.
1