So I'm working on a cliched, crappy fantasy and my code has gone to Hell. I have two pronoun variables (just two!) and only one works. Here's the script I have for 'em. Can you fine people help my confusion?
1. You cannot put spaces between a macro's name and the opening arrow brackets (<<) and you must quote strings.
WRONG << set $gender to male >>
CORRECT <<set $gender to "male">>
2. You forgot the assignment operator (= or to) and you must quote strings.
WRONG <<set $gender female>>
CORRECT <<set $gender to "female">>
3. You're trying to use macros in a script tagged (as in JavaScript) passage. You either need to simply <<display>> the passage or make a pseudo-macro out of it.
Attached is your example with fixes and your script tagged passage reworked into a pseudo-macro.
If Andrew, then you're doing something wrong, because my example works correctly, assuming Andrew is supposed to be male. It was tested to ensure correctness.
If Lucia, then your original code for Lucia (in the Lucia passage) was trying to set them to female:
<<set $gender female>> Your name is Lucia.
So, I merely continued that in my example code (again, in the Lucia passage):
<<setupChar "Lucia" "female">>\ Your name is Lucia.
If Lucia is supposed to be male, simply change the call to <<setupChar>> in the Lucia passage to reflect that. For example:
<<setupChar "Lucia" "male">>
Regardless, here's a continuation of my last example in which each identity passage (Andrew & Lucia) links to a new passage (Who am I?) which prints out all of the set $variables ($Name, $They, $they, $Them, $them, $Their, $their).
Comments
1. You cannot put spaces between a macro's name and the opening arrow brackets (
<<
) and you must quote strings.2. You forgot the assignment operator (
=
orto
) and you must quote strings.3. You're trying to use macros in a
script
tagged (as in JavaScript) passage. You either need to simply<<display>>
the passage or make a pseudo-macro out of it.Attached is your example with fixes and your
script
tagged passage reworked into a pseudo-macro.Err... it still appears to be calling the male "Lucia" and using mostly female terms for him.
If Andrew, then you're doing something wrong, because my example works correctly, assuming Andrew is supposed to be male. It was tested to ensure correctness.
If Lucia, then your original code for Lucia (in the
Lucia
passage) was trying to set them to female: So, I merely continued that in my example code (again, in theLucia
passage): If Lucia is supposed to be male, simply change the call to<<setupChar>>
in theLucia
passage to reflect that. For example:Regardless, here's a continuation of my last example in which each identity passage (
Andrew
&Lucia
) links to a new passage (Who am I?
) which prints out all of the set $variables ($Name
,$They
,$they
,$Them
,$them
,$Their
,$their
).