Howdy, Stranger!

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

Problem using (set:) and (click:) with (append:)

edited May 2015 in Help! with 2.0
Example 1:
(set: $room1Door to "closed")You close the [door. ]<door|(click: ?door)[(append: ?door)[And as soon as you do, something really bad happens! ]]

Example 1 Results:
You close the [door. ] <-- (broken super special click/append)

---
Example 2:
(set: $room1Door to "closed")
You close the [door. ]<door|(click: ?door)[(append: ?door)[And as soon as you do, something really bad happens! ]]

Example 2 Results:
extra line of whitespace here
You close the door. And as soon as you do, something really bad happens! <-- (working super special click/append)

---
Example 3:
{
(set: $room1Door to "closed")
You close the [door. ]<door|(click: ?door)[(append: ?door)[And as soon as you do, something really bad happens! ]]
}

Example 3 Results:
You close the [door. ] <-- (broken super special click/append)

---
Example 4:
You close the [door. ]<door|(click: ?door)[(append: ?door)[And as soon as you do, something really bad happens! ]](set: $room1Door to "closed")

Example 4 Results:
You close the door. And as soon as you do, something really bad happens! <-- (no extra whitespace and a working super special click/append)

---

Regarding Example 3, I know whitespace issues are being addressed in the next version so I'm hoping the example with the curly braces can be worked around using slashes in the future. I'm just not sure why it breaks the link. All I was trying to do there was get rid of the single line of whitespace that comes from putting the (set:) on its own line.

It looks like Example 4, is the only way to get the (click:)/(append:) to work along with the (set:) and not have a line of extra whitespace. Or did I miss something in the docs and am just doing this wrong?

Comments

  • I tested your 4 examples using the new beta version of Harlowe available in this post with the following results:

    Ex1: Now returns a "This tagged hook doesn't have a matching ]" error for the door hook.

    Ex2: Still has the extra line of white space before the start of the text.

    Ex3: This now appears to work correctly.

    Ex4: This still appears to work the same as before.

  • greyelf wrote: »
    Ex3: This now appears to work correctly.

    Thanks so much for the sanity check!

Sign In or Register to comment.