Except for that fact that serial isn't a valid object, yes, this will compile. (Serial is a valid object.)
It won't work, because tempkettle, temppot, levelkettle, and levelpot aren't initialized, so the levelarray and temparray arrays are not properly initialized, either.