 		}
 		//set current state to inactive
 		currentRoomState = INACTIVE;
-		returnCode = publishToBroker("state", "inactive");
+		publishToBroker("state", "inactive");
 	}
 	//else if emergency button pressed
 	else if (newRoomState == EMERGENCY) {

Copyright (c) Nicholas Tyrrell, Bournemouth University
Code inspired by http://www.eclipse.org/paho/clients/c/embedded/
*/

#include <SPI.h>
#include <Ethernet2.h>

		digitalWrite(leds[1], HIGH);
		//set current state to caution
		currentRoomState = CAUTION;
		publishToBroker("state", "caution");
	}
	//else if active button pressed
	else if (newRoomState == ACTIVE) {
