Need info on X10.h library

I found this example in a book but it doesn't work, I get a "X10 does not name a type" error. I don't know enough about instances and libraries and the like to figure it out but I will keep looking at examples and I am sure I will figure it out.

// x10 pl513 controller

#include <x10.h>
#include <x10constants.h>

#define rxPin 7
#define zcPin 9
#define dataPin 8
#define repeatTimes 1

 
x10 myHouse = x10.begin(rxPin, dataPin, zcPin); // line with error

 void setup() {

  myHouse.write(C, ALL_UNITS_OFF, repeatTimes);
}

void loop()  {

  myHouse.write(C,UNIT_1, repeatTimes);
  myHouse.write(C, ON, repeatTimes);
  delay(2000);
  myHouse.write(C,UNIT_1, repeatTimes);
  myHouse.write(C, OFF, repeatTimes);
}