Need some pointers on some code

Also seems to complain about sensorReading now which it had no problem with before I added this new function in.

The compiler either complains, or it doesn't. There is nothing ambiguous about it.

Your collection of if statements should be if/else if statements. There should be no overlap between one block's condition and another block's condition, so only one block should ever be executed, so if/else if/else if is more appropriate than if/if/if.

I agree wholeheartedly with the comment that you need to use Tools + Auto Format. Putting each { on a new line might help you see the program structure better, too. It certainly does for me.

If "seems to" should be "does", post the whole code and the exact error message.