How to solve expected initializer before 'int'. Anyone can help me?

Hi Everybody.
Thanks,Program Fixed

You are missing a semicolon after float tbd4.

Use code tags!

Use arrays

This is your full error message

sketch_nov22a:10: error: expected initializer before 'int'
 int tempwb1 = A0;
 ^

C:\Users\sterretje\AppData\Local\Temp\arduino_6222604773d304ba26dd4050c57c949e\sketch_nov22a.ino: In function 'void setup()':

sketch_nov22a:24: error: expected ';' before 'pinMode'
   pinMode(motor1, OUTPUT);
   ^

C:\Users\sterretje\AppData\Local\Temp\arduino_6222604773d304ba26dd4050c57c949e\sketch_nov22a.ino: In function 'void loop()':

sketch_nov22a:29: error: 'tempwb1' was not declared in this scope
   twb1 = analogRead(tempwb1);
                     ^

sketch_nov22a:36: error: expected ';' before numeric constant
   twb4 = (5.0 * twb4 * 100.0)1024.0;
                              ^

sketch_nov22a:43: error: 'tdb4' was not declared in this scope
   tdb4 = analogRead(tempdb4);
   ^

sketch_nov22a:58: error: expected ';' before 'Serial'
   Serial.println(tdb3);
   ^

sketch_nov22a:61: error: expected ';' before 'Serial'
   Serial.print("tdb4= ")
   ^
exit status 1
expected initializer before 'int'

Usually you work through them from top to bottom.

sketch_nov22a:10: error: expected initializer before 'int'
     ^         ^            ^
     |         |            |
     |         |            +---- error
     |         |
     |         +----------------- line number
     |         
     +--------------------------- filename

The next lines indicate where the compiler lost you; the little ^ indicates where the compiler could no longer follow your code

 int tempwb1 = A0;
 ^

The error is (in this case) just before that; in this case because you missed a semi-colon (as mentioned above) after the declaration of tdb4. You're actually missing a few :wink:

i found another problem. can you solve it for me?

And we have to guess what it is?

No.

I think it will be silly for your output to look like this:

twb1 =

and so on.

saidhans:
Hi Everybody.
Thanks,Program Fixed

Enjoy your forum timeout.