hello, everyone

I have this problem:
I have a variable x1 string and I have x2 byte...I need to create a dummy with X1 and X2 the values it has are 1 and 0 but since x1 this string I have a problem when I assign, I get less observations. With x2 I get the right amount of zeros....

I applied encode to x1, because destring doesn't work for me, and that error is generated, also the variable x1 has "???" in 3 observations,.

Do you think I should delete these observations first and try destroing again?