We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › Simple draw many different rects sketch not work
Page Index Toggle Pages: 1
Simple draw many different rects sketch not work (Read 217 times)
Simple draw many different rects sketch not work
Dec 13th, 2008, 11:29pm
 
Hi , i am doing this example from the "C.C.A.C.A." book, and is exactly the same and it doesnt work, it says

The function ........ does not exist:
...


Code:
void setup(){
size(400,400);
background(#FF0051);
for ( int i=0 ; i<100 ; i++)
drawRectangle(random(width),random(height), random(200),
random(200));
}
}
void drawRectangle(float x, float y , float w, float h){
 rect (x,y,w,h);
}
   


What is wrong?

  Thanks !  
Re: Simple draw many different rects sketch not wo
Reply #1 - Dec 13th, 2008, 11:33pm
 
Hi got it, i have to put one open curly brace at the end of my for loop,

it's just that in the book is missing.
Page Index Toggle Pages: 1