Hello,
Should this code work? - It doesn't give any errors, but just want to make sure it does pick the user with the most votes.
I wasn't able to troubleshoot it.
{_voteplayer} should be the most voted player, when the loop is done.
Should this code work? - It doesn't give any errors, but just want to make sure it does pick the user with the most votes.
I wasn't able to troubleshoot it.
{_voteplayer} should be the most voted player, when the loop is done.
Code:
set {_no} to 0
loop {VoteList::*}:
if loop-value is higher than {_no}:
set {_vote} to loop-value
set {_no} to loop-value
set {_voteplayer} to loop-index parsed as player
Code:
command /vote [<player>]:
description: Vote a player
trigger:
if {Vote::%player's uuid%} is not set:
set {Vote::%player's uuid%} to now
add 1 to {VoteList::%arg-player%}
else:
send "&cYou have already voted."