Howdy, Stranger!

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

Is there a way to go to (history:)'s 2nd last? (Harlowe)

Hello! I'm making an inventory system for a game, and since the single inventory page was getting QUITE crowded (and therefore lagging horribly whenever I edit it and/or test it) I decided to make a secondary page for USING whatever items you may have, on a categorical basis. I've been using
(set: $return to "(link-goto: \"Continue\", (history:)'s last)")
to get back to the actual game, which has been working quite well for me. What I wanted to know: is there a special syntax for going to history's SECOND last? Just using my usual $return will create and infinite loop between the 'use item' and 'inventory' page, which is not what I want at all.

I have tried doing:
(set: $return to "(link-goto: \"Continue\", (history:)'s second last)")  AND
(set: $return to "(link-goto: \"Continue\", (history:)'s 2nd last)")
but to no real avail.

Is there a way to do this?

Comments

  • As explained in the (history: ) macro documentation that macro returns an Array.

    I suggest you read the Array data section of the Manual, the third paragraph explains how to access the element you want.
  • So the actual answer would be "You're a dumbass, there is a space between '2nd' and 'last' that shouldn't be there. "

    Thanks again greyelf
Sign In or Register to comment.