Setting an attribute string value to blank

Fine Wirer
Hello!

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
You could set the 'title' attribute to something invisible.
For example:

@set title= 
@set name=Smith
{title} {name}

Fine Wirer
Thank you! I knew it would be a simple solution.

Fine Wirer
Alas, it delivers 'null'.

leobos67
Fine 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
Hmm, 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.

This topic is now closed. Topics are closed after 180 days of inactivity.

Support

Forums