Board Thread:Lua Help/@comment-28857013-20150218124053/@comment-24473195-20150219164954

I see that your repetitive function seems to be a.cntr.

There are a couple of things you could do to make it more efficient. First of all you're repeating too many things,  for example this fragment : tag( voteSymbols[ 1 ] , tonum( frame. args[ 1 ] ) )

It easily be changed into a variable. In your case you can have an inner function that'll take care of most of your worries. An inner function works pretty much like a regular function except that it only exists within the parent function, e.g.:

function vote

local function createTag (args) local sTag = ""; for (int i=0;i<args;i++) sTag = sTag ..tag(voteSymbols[1],tonum(frame.args[1])) .. ' '         end return sTag; end local newTag = createTag(5)... createTag(3) return newTag end