Right.
Firstly, the App Inventor code should work fine, it is working fine for other Users, and the format was already val|val|val|val - changing the variable name does not affect the receipt of the data nor the processing of it.
Secondly, my code already does perform an if-else on the front values which you can copy-paste for the other 3 values.
When you say you tried my code - did you try the file or did you copy bits of my code and add it to your original file? I ask because your current effort still contains mistakes that my file corrected. There is also a couple of new mistakes in the .ino file now.
I think I have done all I can to help you.