Further to the earlier answer here:
http://twinery.org/questions/40354/inventory-conundrum-sugar-cube-2-21
EDITED.
Choose a Character Class
<<nobr>>
<<set $choices to [
"Forward Observer",
"Technologist",
"Man-At-Arms",
"Insider",
"Rover",
"Yeoman",
]>>
<<set $pcClass.classDescription to []>>
<<for _i to 0; _i lt $choices.length; _i++>>
<<capture _i>>
<<linkreplace "$choices[_i]">>
<<set $pcClass.classDescription.push($choices[_i])>>
<<if $pcClass.classDescription.length gte 1>><<goto "Custom Character Creation 2">><</if>>
<</linkreplace>>
<</capture>>
<br>
<</for>>
<</nobr>>
I have altered the code for one choice only correctly I think, but the following part I must have to match the inventory code:
$playerClass.classDescription
Using this, instead of just <<$playerClass.push>> and also <<$playerClass.length>> is causing errors, saying it is a bad evaluation/cannot read etc.
I'm not sure of the intricacies of this one, as normally the variable doesn't have the extra <<.classDescription>> but I need it to have this otherwise it will not match the inventory code etc.
What wizardry am I miscasting here?