Forerunner Gaming
Needs Fixing - Printable Version

+- Forerunner Gaming (https://forerunnergaming.org/forums)
+-- Forum: Server Discussion (https://forerunnergaming.org/forums/forumdisplay.php?fid=19)
+--- Forum: Suggestions (https://forerunnergaming.org/forums/forumdisplay.php?fid=20)
+--- Thread: Needs Fixing (/showthread.php?tid=1181)



Needs Fixing - Jake1o - 04-29-2015

This has always bothered me probably more than it should be still should be fixed.

Image

Not sure how 6/13 = winning.... Should be a majority so 7/13 MINIMUM.


RE: Needs Fixing - Terran - 04-29-2015

That is odd, hm. Does it somehow not actually include people who didn't vote?


RE: Needs Fixing - Aresuft - 04-29-2015

i think its because it gives the person being voted against a vote but dosent count it in the end


RE: Needs Fixing - Brassx - 04-29-2015

Dunno.

ULX has always been weird, but the code looks like it should work:

PHP Code:
local function voteDone)
 
local results t.results
 local winner
 local winnernum 
0
 
for idnumvotes in pairsresults ) do
 if 
numvotes winnernum then
 winner 
id
 winnernum 
numvotes
 end
 end

 local str
 
if not winner then
 str 
"Vote results: No option won because no one voted!"
 
else
 
str "Vote results: Option '" .. t.optionswinner ] .. "' won. (" .. winnernum .. "/" .. t.voters .. ")"
 
end
 ULib
.tsay_str ) -- TODOcolor?
 
ulx.logStringstr )
 
Msgstr .. "\n" )
end 

It gets the voting option that had the most amount of votes, so not sure why 6 would beat 7, unless it counted the players that did not vote too.


RE: Needs Fixing - Jake1o - 04-30-2015

(04-29-2015, 11:57 PM)Brassx Wrote:  Dunno.

ULX has always been weird, but the code looks like it should work:


PHP Code:
local function voteDone)
 
local results t.results
 local winner
 local winnernum 
0
 
for idnumvotes in pairsresults ) do
 if 
numvotes winnernum then
 winner 
id
 winnernum 
numvotes
 end
 end

 local str
 
if not winner then
 str 
"Vote results: No option won because no one voted!"
 
else
 
str "Vote results: Option '" .. t.optionswinner ] .. "' won. (" .. winnernum .. "/" .. t.voters .. ")"
 
end
 ULib
.tsay_str ) -- TODOcolor?
 
ulx.logStringstr )
 
Msgstr .. "\n" )
end 

It gets the voting option that had the most amount of votes, so not sure why 6 would beat 7, unless it counted the players that did not vote too.

Yeah it must count the players that didn't vote. Is it possible to not count those or maybe an easier way is to count them as no that way it wont say 6/13 is winning? This way the vote simply won't pass.


RE: Needs Fixing - Brassx - 04-30-2015

(04-30-2015, 12:23 AM)Jake1o Wrote:  
(04-29-2015, 11:57 PM)Brassx Wrote:  Dunno.

ULX has always been weird, but the code looks like it should work:



PHP Code:
local function voteDone)
 
local results t.results
 local winner
 local winnernum 
0
 
for idnumvotes in pairsresults ) do
 if 
numvotes winnernum then
 winner 
id
 winnernum 
numvotes
 end
 end

 local str
 
if not winner then
 str 
"Vote results: No option won because no one voted!"
 
else
 
str "Vote results: Option '" .. t.optionswinner ] .. "' won. (" .. winnernum .. "/" .. t.voters .. ")"
 
end
 ULib
.tsay_str ) -- TODOcolor?
 
ulx.logStringstr )
 
Msgstr .. "\n" )
end 

It gets the voting option that had the most amount of votes, so not sure why 6 would beat 7, unless it counted the players that did not vote too.

Yeah it must count the players that didn't vote. Is it possible to not count those or maybe an easier way is to count them as no that way it wont say 6/13 is winning? This way the vote simply won't pass.

Yeah.

Step 1: Remove GPU from motherboard.
Step 2: Open Disc tray.
Step 3: Boil some water.
Step 4: Pop open your microwave, and stick your GPU in it for 3- 4 minutes tops(sparking is completely normal).
Step 5: Put uncooked instant ramen noodles in the pot of boiling water. Stir till tender.
Step 6: Drain the noodles, and bring them to your disc tray. Jam them in there, then close it.
Step 7: Re-insert GPU into motherboard.
Step 8: Boot up PC and try the vote again.


RE: Needs Fixing - Terran - 04-30-2015

I saw an image of something similar and to this day I tend to randomly curl up in a ball and cry.


RE: Needs Fixing - Jake1o - 04-30-2015

(04-30-2015, 01:27 AM)Brassx Wrote:  
(04-30-2015, 12:23 AM)Jake1o Wrote:  
(04-29-2015, 11:57 PM)Brassx Wrote:  Dunno.

ULX has always been weird, but the code looks like it should work:




PHP Code:
local function voteDone)
 
local results t.results
 local winner
 local winnernum 
0
 
for idnumvotes in pairsresults ) do
 if 
numvotes winnernum then
 winner 
id
 winnernum 
numvotes
 end
 end

 local str
 
if not winner then
 str 
"Vote results: No option won because no one voted!"
 
else
 
str "Vote results: Option '" .. t.optionswinner ] .. "' won. (" .. winnernum .. "/" .. t.voters .. ")"
 
end
 ULib
.tsay_str ) -- TODOcolor?
 
ulx.logStringstr )
 
Msgstr .. "\n" )
end 

It gets the voting option that had the most amount of votes, so not sure why 6 would beat 7, unless it counted the players that did not vote too.

Yeah it must count the players that didn't vote. Is it possible to not count those or maybe an easier way is to count them as no that way it wont say 6/13 is winning? This way the vote simply won't pass.

Yeah.

Step 1: Remove GPU from motherboard.
Step 2: Open Disc tray.
Step 3: Boil some water.
Step 4: Pop open your microwave, and stick your GPU in it for 3- 4 minutes tops(sparking is completely normal).
Step 5: Put uncooked instant ramen noodles in the pot of boiling water. Stir till tender.
Step 6: Drain the noodles, and bring them to your disc tray. Jam them in there, then close it.
Step 7: Re-insert GPU into motherboard.
Step 8: Boot up PC and try the vote again.

IT WORKS!


RE: Needs Fixing - Terran - 04-30-2015

We have a new thing to add to deleting System32 now.