ULX

Author Topic: Need help with a VoteGrav command  (Read 1583 times)

0 Members and 1 Guest are viewing this topic.

Offline Mario Mom

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Need help with a VoteGrav command
« on: January 09, 2017, 12:25:46 PM »
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
Code: [Select]
Lua Error: addons/ulx/lua/ulx/log.lua:479: bad argument #2 to 'format' (number expected, got string)
« Last Edit: January 09, 2017, 12:27:45 PM by Mario Mom »

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given