Concatenation Trouble


Whats wrong here? last line probably

*label player_choose_name

"My name is ...."

		*set name "Awyer"
		*goto set_surname
		*set name "Tasbel"
		*goto set_surname
	#It's ...
		*input_text name
		*goto set_surname

*label set_surname
My surname is ...
		*set surname "Ardir-per"
		*goto hut_3
		*set surname "Ildoy-iss"
		*goto hut_3
		*input_text surname
		*goto hut_3
*label hut_3
*set full_name (name &vx )&surname
Well then, ${full_name}, welcome to my humble abode.


Even though I haven’t used Choicescript, all the game codes I’d seen had the first name and last name variable separated.

You’d have to insert the firstname variable first, then the lastname variable.

I also think you shouldn’t combine them.


How to format your code so it can be seen on the forum.

Paste code into window.
Highlight all of the code.
Click the preformatted text button. (It looks like </> and is next to the quote one and on the same bar as the other formatting and smilies choice.)
Click reply.


oops, thanks for that tip


You have

*set full_name (name &vx )&surname

it should be

*set full_name (name&" ")&surname

I suggest reading the wiki if you haven’t. In particular

Concatenating Current Variables
To concatenate values within variables you follow the same syntax as before, but do not enclose your arguments in quotation marks, for example:

*set firstname “Roger”
*set lastname “Davis”
*set fullname (firstname&" ")&lastname
Note: the seperate space string, this is because in a firstname/lastname variable we wouldn’t have a space and cannot add it like we could with raw strings.