Serialprint is different if written first to variable

Hey,
gfvalvo thanks for the reminder of volatile. I forgot to declare the set variable as volatile. Now it works. Thanks you guys so much