I'm not sure if this is connected right

At one time I had the same error and I corrected it by entering an “int” for that command “wire.write(0)” as such:

int i = 0;
wire.write(i);