Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

"Either" macro inside another "either" macro?

edited March 2016 in Help! with 2.0
I'm sure the answer to this is insanely simple, but I can't quite do it.

I'm trying to put an "Either" macro inside another "Either" macro, as the subject says. To give you an idea of what I mean, here's an example:

A (either: "bolt of lightning", "(either: "large", "huge", "giant") fireball") flies out of the wand.

As you can see, I want it to say either "bolt of lightning" or "fireball," with either "large," "huge," or "giant" in front of "fireball" if it comes up as such. Is there a way to do this? Any help would be greatly appreciated.

Comments

  • You are trying to use double quotes to do two things in the "(either: "large", "huge", "giant") fireball" part of the example:

    1. the quotes at the start / end of the whole part indicate that it is a string value.
    2. the quotes around each parameter of the (either:) macro indicate each is a string value

    The issue is that Harlowe parses/sees that part like so:

    a. "(either: " (=> a string value)
    b. large (=> an unknown identifier)
    c. ", " (=> a string value)
    d. huge (=> an unknown identifier)
    e. ", " (=> a string value)
    f. giant (=> an unknown identifier)
    g. ") fireball" (=> a string value)

    You can fix this by using a single quote to indicate each of the parameters is a string.
    So your example would now be:
    (either: "bolt of lightning", "(either: 'large', 'huge', 'giant') fireball")
    
Sign In or Register to comment.