Serial2.print("ErrorMsg_");
Serial2.print(z); // z is the variable from your example
Serial2.print(".txt=\"");
Serial2.print(variable);
Serial2.print("\"");
Serial2.print("\xFF\xFF\xFF");
From my Tutorial you can see adout "
at : How to change components' attributes at Nextion from Arduino:
and also How to make a useful pop-up message on Nextion