Declaring methods in Processing.
in
Programming Questions
•
3 years ago
Hi ,
I have the following method that I created in Processing.
processing.app.debug.RunnerException: unexpected token: int
I have even tried to use public int, however, this does not work either.
Can you see what I am doing wrong in this?
Thanks,
PS.
I just moved it down further in the code and also noticed that I get the error
"This method must return a result of type int"
I have the following method that I created in Processing.
- int searchthis( String item)
{
for( int i = 0 ; i< scenes.length ; i++)
{
if(scenes[i].equals(item))
{
return i;
}
else
return -1;
}
}
processing.app.debug.RunnerException: unexpected token: int
I have even tried to use public int, however, this does not work either.
Can you see what I am doing wrong in this?
Thanks,
PS.
I just moved it down further in the code and also noticed that I get the error
"This method must return a result of type int"
1