Using Harlowe 2-1-0 in Twine 2-2-1. I have a simple inventory, to which I want to add different items as we go. These will mostly be just "Key Items," so the overall inventory should be pretty sparse. I want it set up so that whenever an item is added, you can click on the item's name, which is displayed in the Inventory screen from the array, and it will in turn display the item's description and other info below. However, when I put the (click:) macro in, I get the "☕ Invalid or unexpected token►This error message was reported by your browser's Javascript engine. I don't understand it either, but it usually means that an expression was badly written." message, linked to the (click: "shotgun").
Here's the code for my inventory screen:
(if: $inv's length > 0)[You have (print: $inv.join(", ")) in your backpack, and $money dollars in your pocket.](else:)[You have nothing in your backpack, but you do have $money dollars in your pocket.]
(if: $inv contains "your shotgun")[(click: “shotgun”)[(print: $shotguntext)]]
I've also tried the expression with putting the text from $shotguntext into its own passage, and trying to display that passage instead, but it still has the same problem. What's puzzling me is that it worked previously, and in a sepparate instance where I use nearly identical code to display "Messages" in an array that is the cell phone. The only difference here is that I use (click-replace:) for that section, and I tried using that here as well, and it didn't do me any good.
Here's the code that puts the shotgun into the inventory, and sets it's properties:
(set: $sgowner to "Mr. Gilmore")
(set: $inv to $inv + (a: "your shotgun"))
(set: $sgammo to 20)
(set: $shotguntext to "The shotgun you got from $sgowner's office. Simple, effective, and deadly, this weapon will undoubtedly save your life multiple times.
Ammo: $sgammo")
Am I missing something simple here?