I have problem with adding pictures to array.
:: Inventory
Here is what we have in stock:
<<for _item range $inventory>>
<<if not _item.owned>>
<<capture _item>>
<<button _item.name + " - Buy for " + _item.price + " coins">>
<<set $itemId to _item.id>>
<<set _image to _item.image>>
<<run alert("Before going to Buy Clothing, setting item ID to " + $itemId)>>
<<goto "Buy Clothing">>
<</button>><br>
Category: <<print _item.category>><br>
<img src="images/<<print _item.image>>" style="width:100px;height:100px;"><br><br>
<</capture>>
<<else>>
<<capture _item>>
<<button "Wear " + _item.name>>
<<set $itemId to _item.id>>
<<goto "Wear Clothing">>
<</button>> - Currently wearing: <<print $currentOutfit[_item.category] is _item.id ? "Yes" : "No">><br>
<img src="images/<<print _item.image>>" style="width:100px;height:100px;"><br><br>
<</capture>>
<</if>>
<</for>>
StoryInit
<<set $money = 100>>
<<set $inventory = [
{id: "shirt",
name: "Cool Shirt",
price: 25,
owned: false,
category: "torso",
image: "shirt.jpg"},
{id: "pants",
name: "Stylish Pants",
price: 40, owned: false,
category: "legs",
image: "shirt.jpg"},
{id: "hat",
name: "Fancy Hat",
price: 15,
owned: false,
category: "head",
image: "shirt.jpg"}
]>>
<<set $currentOutfit = {head: null, torso: null, legs: null}>>
no matter what variable corresponding to the photo I enter in “src=” it does not work.
Can somebody help me with this?