How to compare floats and ints

if ((weight >= 30) && (weight<=35))
{
  val = 0;
  String bolt = "AL-0.500" ;
}

A variable (String bolt) that is declared inside of a function is local to that function. When the function exits (is finished) the variable no longer exists.

String bolt= "--Null--" ;

Here a variable of the same name is declared globally. The local variable and the global variable are not the same. They are actually 2 different variables. The local version only exists within the function so when you print "bolt", outside of the function, you are printing the global version that has the value "--NULL--". Remove the String data type specifier from all of the if statements so that you are changing the global version.

Edit: I guess is should say "if block" instead of "function" to be more accurate.