Starry night


#1

void setup() {
size(400,400);
background(0);
noStroke();
}

void draw() {
background(0);
ellipse(random(width) ,random(height), 4, 4);
}

void setup()
{
size(500,500);
}

void draw()
{

fill(244,137,66);

rect(height-300,width-200,100,200);

fill(83,244,66);

rect(150,250,50,50);

 fill(83,244,66);

rect(150,300,50,50);

fill(83,244,66)

rect(150,350,50,50);

fill(83,244,66)

rect(200,250,50,50);

fill(83,244,66);

rect(250,250,50,50);

fill(83,244,66);

rect(300,250,50,50);

fill(83,244,66);

rect(300,300,50,50);

fill(83,244,66);

rect(300,350,50,50);

fill(83,244,66);

rect(200,300,50,50);

fill(83,244,66);

rect(250,300,50,50);

fill(83,244,66);

rect(250,200,50,50);

fill(83,244,66);

rect(200,200,50,50);

fill(83,244,66);

rect(225,175,50,50);

void draw()
{
I am trying to create a starry night back ground but i keep getting a "maximum call stack sized exceeded"


#2

This looks like code from Processing.js. Am I right? Unfortunately this site does not have that support. They use it on Khan Academy, but then why wouldn't they. It's creator is a partner of theirs. Same fellow who created jQuery.

The last couple of lines in your code look suspicious. There should be a closing brace above them to close that void.draw() block. You should be able to add a closing brace to the very end and leave that block empty, for now. It won't hurt anything.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.