A nightmare with I2C serial link, especially with onReceive

You have

If you get rid of the semi-colon and change (x) to int(x) it will compile but you'll get orange notes that something is still amiss.