A Basic Tutorial on Name, Relationship and Gender Variables


#41

Why is it gosub instead of goto?


#43

There’re actually no much difference between both in this case. It’s just about using the correct label, and *goto will yield result just like *gosub gives.


#44

I seem to be having an issue with the full name code. [code]*goto hello_name

*label hello_name
*set fullname (name& " ") &surname
“Hello {mr} {name} ${surname}. It is nice to meet you.”[/code]

For some reason the ${fullname} is reading like this on the stat page is showing like this

name Chosen surname.

So the surname shows up but the name is just the word name. I copied it from the tutorial and tried moving things around several ways but still can’t seem to fix it. What am I missing?


#45

Assuming both name and surname are set correctly have proper values, I can see just two issues with your examples there:

*set fullname (name&" ")&surname

Two spaces removed – it should all be one ‘word’ except where you actually want a space &" ".

“Hello ${mr} ${name} ${surname}. It is nice to meet you.”

Each variable name needs the dollar symbol to display properly.


#46

Right, sorry about the dollar signs. For some reason the disappeared when I copied the text from note pad. But they are in the original code.

I’ll try the editing out the extra spaces tomorrow, fingers crossed that works. Thanks for the help