Hi,
I have an array of two items:
$interactingRaiders
I'd like to be able to display each item as a link and, if it is selected, remove the other item from the array. My code currently says (paraphrased):
you could do something or other with [[$interactingRaiders[0].name|Aggression Training][$interactingRaiders.deleteAt(1)]]
or with [[$interactingRaiders[1].name|Aggression Training][$interactingRaiders.deleteAt(0)]]
(line break added to save scrolling in this question)
However, when I click on one of those links I get a pop up error message saying:
Type Error: state.active.variables.interactingRaiders.deleteAt is not a function
I'm using SugarCube and got the details of deleteAt from
here but I note that the heading of that page is Sugarcube 2.x and when I click on my story format it says SugarCube 1.0.34 I'm wondering if that's the issue - that I'm using version 1 of Sugarcube and deleteAt only appears in 2? If so, how do I update it? If not, what am I doing wrong?
Thanks in advance
Comments
greyelf has already covered where to find information on how to install SugarCube 2, should you desire to do that—I'd certainly recommend it.