Can't make any dynamic table [Twine 2/Sugarcube]

0 votes
asked May 9 by Maga (280 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 but don't work either

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

<<for _i to 0; _i lt 5; _i++>>

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

0 votes
answered May 9 by Maga (280 points)
Best answer
found it, it doesn't works with debug mode on but with the standard mode, it does. Will note that bug
commented May 9 by TheMadExile (43,810 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
answered May 9 by Akjosch (6,240 points)
Your code works perfectly fine for me (Twine 2.1.3 / SugarCube 2.18.0 specifically).
commented May 9 by Maga (280 points)
as I though. Could it be that I'm on Linux ? Can't get where is the problems
commented May 9 by Maga (280 points)
are you sure it works? can't make it works on the online version of twine, even with Windows
commented May 9 by Akjosch (6,240 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.

Welcome to Twine Q&A, where you can ask questions and receive answers from other members of the community.

You can also find hints and information on Twine on the official wiki and the old forums archive.

See a spam question? Flag it instead of downvoting. A question flagged enough times will automatically be hidden while moderators review it.