Particle.variable() example on Oak fails to compile

What system version have you set as target?
This error mesage looks like a depricated form of Particle.variable()

You could try

  Particle.variable("mess2", aString, STRING);