$ 0 0 Try changing the type of 'gallons' to long rather than unsigned long and see if that helps eg long gallons;