$nameholder is a string that includes both first and last name (and a space in between.) So the string I'm trying to push into the $recruits array is "joe fawn", not two separate strings of "joe" and "fawn."
Basically the problem is that the push isn't working. You can ignore the $nameholder thing. If you try and push a simple string, like "dumbo" without using the $nameholder variable in the push function, it still doesn't work.
note: the following is just for informational purposes.
Leon has suggested in a previous posting that the default way to add items to an array in Harlowe is to concatenate / add two arrays together:
Initialize the list array
(set: $list to (a: "cat"))
initial list: (print: $list)
count: (print: $list's length)
Adding Dog to the list.
(set: $list to it + (a: "dog"))
amended list: (print: $list)
count: (print: $list's length)
Comments
Essentially:
I think you’d have to create a Data Map in order to hold first and last names to accomplish what you want.
Basically the problem is that the push isn't working. You can ignore the $nameholder thing. If you try and push a simple string, like "dumbo" without using the $nameholder variable in the push function, it still doesn't work.
Leon has suggested in a previous posting that the default way to add items to an array in Harlowe is to concatenate / add two arrays together: