I think this is a general error that an entry level programmer alway gets. In STATA or other statistical softwares like SAS, you might want to remember a rule of thumb that you can only define the attribute or type of one variable to either character or numeric.
In your previous code, you first assign nationality to "na", a character variable, and then want to assign it to "1", a numeric variable. This disobeys the above rule. So STATA returns an error code indicating type mismatch.
Keep this in mind you will not have similar problem again.