correcting a code for 360, inductive sensor switch and weight sensor

I am a beginner and I was doing a project that brings to the station.
I was wondering that if my code is correct using an inductive limit sensor switch and a weight sensor.
because I want transfer to another station.

int Station = 0;

switch (regular)
{
case 0:
Cupdispencer ();
Serial.println(“CupdispencerON”);
count = count + 1;
val = cell.read(); // most recent reading
int emptyCupWeight;// zero = 8397878
Serial.println(“Weight[g]:”); // print out to LCD
emptyCupWeight = (( val - 8397878 ) / 500.0f - 77.2); // the measure of the weight sensor
Serial.print(emptyCupWeight);
Station = digitalRead (StationSwitch);
if (emptyCupWeight >= 0 && emptyCupWeight < 10) // it will drop the cup to the cup holder
{
if (Station != state) { // inductive limit switch
Serial.println(" I am changing Station");
if (state == 0)
{
rotationServo.write (105); speed for 360 servo
Serial.println(“Moving to position”);
}
else if (state = 1)
{
Serial.println (“Stopping”);
rotationServo.write (90); // stopping 360 servo
}
}
}
break;

int emptyCupWeight;// zero = 8397878

Max (positive) value an int can hold is 32767.

Seems you didn’t read post#4 of your previous thread.
Leo…