regular PBC or PBP (pro)?

If you didn't define the variables or you're using PBC, i don't see the error source

PBC don't have the HPWM statement, you'll need to POKE the PIC registers as per the PIC datasheet.