0 votes
by (300 points)

hello everyone

 

I'm trying to make a dynamic table in a Twine/Sugarcube code. I've tried with Twine/sugarcube and Tweego/sugarcube but never been able to make it works.I've tried the solution of this topic http://twinery.org/questions/2007/how-do-you-make-a-dynamic-table-twine-2-sugarcube but don't work either

<<nobr>>
<<set _tab to ["a","b","c","d","e"]>>

<table>
<<for _i to 0; _i lt 5; _i++>>
	<tr>
		<th>_i</th>
		<td>_tab[_i]</td>
	</tr>
<</for>>
</table>
<</nobr>>

give me this on Twine :

0 a 1 b 2 c 3 d 4 e

and give me this with Tweego :

0 a 1 b 2 c 3 d 4 e

 

by inspecting the HTML code source, I find the <table> with <span> in it (instead of the <td> and <tr> I was hoping for).

 

Any ideas ?

2 Answers

+1 vote
by (300 points)
 
Best answer
found it, it doesn't works with debug mode on but with the standard mode, it does. Will note that bug
by (68.6k points)
That's not a bug.  The Test mode's debug views aren't magical, so to mark up the debug output they actually need to inject markup.

If you want to test output formatting, then you want to use Play mode.  I'd reserve Test mode for tracking down other issues.
0 votes
by (8.6k points)
Your code works perfectly fine for me (Twine 2.1.3 / SugarCube 2.18.0 specifically).
by (300 points)
as I though. Could it be that I'm on Linux ? Can't get where is the problems
by (300 points)
are you sure it works? can't make it works on the online version of twine, even with Windows
by (8.6k points)

Yes, I am sure. this is a story file with just your code in a single passage. See if it works for you too.

...