Board Thread:Lua Help/@comment-2170536-20150327185855

Is there a way to generate a poll dynamically with Lua? I've tried a couple of different things now and neither of them work.

Simply returning an entire poll object just returns an unformatted string:

Template:

Output: Was the Strategy Guide "Flammy's Strategy Guides" useful? Yes No

I can actually get a poll to be generated by removing the poll tag from the Lua module and putting it into a template:

Template:

Unfortunately, it doesn't matter what the argument is, the poll results are identical for all polls (even though the poll looks correct). If I create a new strategy guide with a different name, I inherit the results of the previous poll. So obviously it's using the raw invoke string as the key to create the poll object, and continuing to access that data even though the poll question itself is changing.

Anyone have any ideas? 