I'm kind of new to this, so please bear with me and my really awful syntax.
I'm using Harlowe 2.1.0 to make an inventory with descriptions that appear when you click on the object's name. This is what I have:
(set: $inv to (a: "apple"))
I have an (print: $inv)!
|apple)[It's crispy and delicious.
Close (click: "Close")[(replace: ?apple)]]
(if: $inv has "apple")[(replace: "apple")[(link-repeat: "apple")[(show: ?apple)]]]
(link-goto: "go back", (history:)'s last)
It works as it should, but I get the error "missing ] after element list". This error is specifically tied to the last bit of code with the (if:). I'm not sure why it appears and how I can fix it? And also, is there a cleaner way to write it out? I can't really have the inventory link anywhere else because I also want to include a way to get back to the original passage. Any help and suggestions are appreciated.