Hi everyone! I'm trying to write a function inside another function. Both return float values but for some reason (probably something really stupid I've overlooked or simply ignored) processing is giving me a unexpected token:float error. The code in particular is the following. Thanks a lot for your help!!!
- float numberbeans() {
- current();
- curb= map(curmili, 0, totalmili, 0, totalbeans);
- float current() {
- curs=second();
- curh=hour();
- curd=day();
- curm=month();
- curml=millis();
- cursec=((((curm-1)*30+curd)-1)*24+curh)*3600+curs;
- curmili=(cursec-1)*1000+curml;
- return(curmili);
- }
- return(curb);
- }
1