void SetData(char *type, uint32 data) { .... if(data == 2) { ... if(RefectoryDoor) OpenDoor(RefectoryDoor); } }