It looks like you're new here. If you want to get involved, click one of these buttons!
<<set $shop =[ {name: "Sword", price:10, dice: "1D4", bm: 0}, {name: "Axe", price: 12, dice: "1D4", bm: 1} ]>>
<table> <tr> <th>Item</th><th>Weapon</th><th>Price</th><th>Hit points</th><th>+/ -</th> </tr> <<for $i to 0; $i lt $shop.length; $i++>> <tr> <td><<print ($i + 1)>></td> <td><<print $shop[$i].name>></td> <td><<print $shop[$i].price>></td> <td><<print $shop[$i].dice>></td> <td><<print $shop[$i].bm>></td> </tr> <</for>> </table> <table> <tr> <td>1</td> <td>2</td> </tr> <tr> <td>3</td> <td>4</td> </tr> </table>work's fine without loop.
Comments
EDIT: Crap! I tested that in Twine 1.4.2 since I failed to notice you were using Twine 2. It worked in Twine 1, but not in Twine 2.
However, using more backslashes did work:
I only need to escape for line: