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 › Problem with frameRate function. Noobie
Page Index Toggle Pages: 1
Problem with frameRate function. Noobie (Read 299 times)
Problem with frameRate function. Noobie
Nov 21st, 2008, 8:44pm
 
Hey whats up guys ? I am reading the Creative coding and computational art book,

And in the bouncing ball sketch ,if i have it whith

frameRate (30);

it works, but if i delete the 30 inside and i leave it like this:

frameRate ();  

i get this error:

...

What im i doing wrong ?
Re: Problem with frameRate function. Noobie
Reply #1 - Nov 21st, 2008, 10:00pm
 
Hi there,

The brackets () is where parameters go (for the method frameRate). A parameter is an instruction to how the method should operate. 30 means 30 frames a second are drawn in the draw method(in this case). Some methods can have more than one implementation, and this means they can have different numbers of parameters. In this case, Processing is telling you there is no frameRate method that takes no parameters. This means you have to put a number inside the brackets.

Now, what are you trying to achieve Are you trying to speed up or down the bouncing ball for instance




TweakingKnobs wrote on Nov 21st, 2008, 8:44pm:
Hey whats up guys I am reading the Creative coding and computational art book,

And in the bouncing ball sketch ,if i have it whith

frameRate (30);

it works, but if i delete the 30 inside and i leave it like this:

frameRate ();  

i get this error:

www.mediafire.com/imgbnc.php/47b3edf1dbb0d0a18779ea7d5bb690196g.jpg

What im i doing wrong

Re: Problem with frameRate function. Noobie
Reply #2 - Nov 21st, 2008, 10:41pm
 
Allright, i dont want to speed up the ball is just that in the book says that if i leave it empty it should run at the default of 30, and like its not working i just wanted to knoe why, thanx !
Re: Problem with frameRate function. Noobie
Reply #3 - Nov 21st, 2008, 10:50pm
 
OK, fair enough, I'm guessing the following:

a) The book is referencing a different (older) version of Processing where this was possible (but it is no longer allowed)

b) The default is 60, so leaving it the line frameRate(30); out results in the frame rate being 60 (in other words, frameRate(60); is called unless you call something else.

I could be wrong though.
Page Index Toggle Pages: 1