Don't know how to use XString

Hi! there is my code:


The gray part all does not work(i know this is a comment).

try use switch case node


The first time everything goes right. When I try to set the variable a second time, this error appears.