Twine Version: 2.3.13
Story Format: Harlowe 3.2.1
I’m struggling with an error that hits when I add a set of strings containing adjectives and the name of an item together into an array containing the full description of that item (e.g. “ornate” + “black” + “iron” + “sword” to result in “ornate black iron sword” when the array values are printed). Here’s the code:
(set: $P1Weap1 to (a: $Weap1Desc1 + " " + $Weap1Color + " " + $Weap1Desc2 + " " to $Weap1Type))
(set: $P1Weap2 to (a: $Weap2Desc1 + " " + $Weap2Color + " " + $Weap2Desc2 + " " to $Weap2Type))
This code works fine as-is for the main character (“P0”), as well as for the secondary character when it runs for other equipment (armor & clothing). However, when it runs the above specifically for the secondary character (“P1”), I get the following error:
Any-type $Weap1Desc1 isn't the same type of data as the string " "
Any-type $Weap2Desc1 isn't the same type of data as the string " "
According to the variables breakdown, however, $Weap1Desc1
and $Weap1Desc2
are indeed defined as strings, and $Weap1Desc1 is string
tests out as true. I’m sure there’s some really easy fix here and I’m going to facepalm hard enough to leave a mark when someone points it out to me, but I can’t for the life of me figure out why Harlowe is insisting that $Weap1Desc1
is a datatype “Any-type” instead of a string when all evidence indicates otherwise. Any thoughts on where my error could be?