Setting an attribute string value to blank
Fine Wirer
12 Apr 2016, 21:00Hello!
I should like my game to permit people to select a title of address, and I would like the option to set that title to be blank if they would prefer no title. For example:
{title} {firstname} {lastname} is neat.
Should ideally read:
Miss Jane Doe is neat.
or
Mister John Doe is neat.
or
John Doe is neat.
Is there any way to do this? I can't seem to get it to do anything but
null John Doe is neat.
Thanks in advance.
I should like my game to permit people to select a title of address, and I would like the option to set that title to be blank if they would prefer no title. For example:
{title} {firstname} {lastname} is neat.
Should ideally read:
Miss Jane Doe is neat.
or
Mister John Doe is neat.
or
John Doe is neat.
Is there any way to do this? I can't seem to get it to do anything but
null John Doe is neat.
Thanks in advance.
leobos67
13 Apr 2016, 05:13You could set the 'title' attribute to something invisible.
For example:
For example:
@set title=
@set name=Smith
{title} {name}
Fine Wirer
13 Apr 2016, 22:24Thank you! I knew it would be a simple solution.
Fine Wirer
14 Apr 2016, 21:54Alas, it delivers 'null'.
leobos67
15 Apr 2016, 05:13Fine Wirer wrote:Alas, it delivers 'null'.
Do you mean that the three lines above don't work as expected?
Please, show the code you've written so I can guess what's going wrong in your implementation.
Fine Wirer
15 Apr 2016, 23:24Hmm, in an attempt to give you a clean example of my code (minus irrelevant story details) it seems to work now. I am having a great deal of trouble getting my javascript to run properly in Squiffy. Without it, @set title worked exactly as described instead of showing 'null smith'. Sorry for the trouble! Looks like my code was the bug.