--- lectronice on 12/3/2013 6:41 AM, wrote:
> However, would it be possible to make it work with this macro from
> the 1.3.6. Sugarcane ? It allows an interesting second parameter:
> the name of the passage the player is sent to after after her answer.
My word, that's a mess.
> Error: cannot execute macro <<textinput>>: c[0] is undefined
>
> I get this by typing *<<textinput $name Hi>>* (*Hi* being the name
> of the passage the player is sent to).
As I mentioned previously, you must quote the $variable name. Or,
I suppose, you could simply not add the $-sigil. (the reason for
this is at the bottom)
Instead of this:
<<textinput $name Hi>>
Do this:
<<textinput "$name" Hi>>
Or this:
<<textinput "name" Hi>>
I'd also get into the habit of quoting passage titles as well, so
if you ever find yourself with a passage title that must be quoted,
say one containing a space or something like that, you'll already
be in the habit of quoting them. For example:
<<textinput "$name" "Hi">>
The reason for quoting the $variable name is because all macros in
SugarCube get $variable substitution automatically. So, if you don't
quote the $variable name, the macro will receive its value instead
of its name. And, in this case, the macro needs the name of the
$variable, not its value.