0 votes
by (230 points)


I'm using twine2/Sugarcube 2.21.

I have probably a dumb issue once again. Using Sugarcube documentation I've created some widget.

Unfortunately, they aren't working right now. The error I get is that "macro does not exist".

Here is a how I created my widget: I've created a passage named Widgets.

Here is one of the widgets in question :

<<widget "tfCheckEvent">>
<<set $TFTotal to 0>>
<<set $TFTotal= ($brianTF + $jenTF + $fatherTF)>>
<<if $TFTotal gte 1>>
<<goto [[Diner TF Events]]>>

And here is how I've declared it in the passage where I wanna use it.


Thanks in advance for helping me.

1 Answer

0 votes
by (68.6k points)

Did you tag your widget passage with widget?

by (230 points)
No, I didn't. Is that needed?
by (44.7k points)

Yes. See the warning in the <<widget>> documentation.

I also tend to add the "nobr" tag to my widget passages so I don't end up with a bunch of blank lines where the code is.  If you want to force a linebreak in a "nobr" tagged passage, just use the HTML <br> element.

by (230 points)
Hey ! Thanks a  lot for the answers. Everything is working fine now.