I'm trying to create a simple votegrav command, which would allow users to choose between low and default gravity. And, to an extent, it works; the first time it is called, it performs its function exactly. on subsequent uses, however, it only shows the voting prompt - nothing happens afterward. I have linked a pastebin with the source below; the commented out code is my original attempt at the command, and the uncommented is the vote and votedone functions copy-pasted and slightly reworked to fit my needs. The issue is consistent across both versions.
http://pastebin.com/gZaKwrDs (only copied part of the code)
http://pastebin.com/fYyGQmPN also worth noting is that the server console shows the following error after all players have voted
Lua Error: addons/ulx/lua/ulx/log.lua:479: bad argument #2 to 'format' (number expected, got string)