Thread Rating:
- 0 Votes - 0 Average
- 1
- 2
- 3
- 4
- 5
Tags Comparison & Region
|
Author |
Message |
Feeh
Sphere Developer
Posts: 156
Likes Given: 6
Likes Received: 40 in 29 posts
Joined: Sep 2012
Reputation: 4
|
RE: Tags Comparison & Region
The best way to find who was the player with most votes is by checking one by one, luckily the FOR statement is here to help us
Code:
local.mostVotedPlayer=1 //always assume the first tag is the one with most votes
local.mostVotes=<dtag.Player_1_Votes>
FOR x 1 10 // loop from 1 to 10, assuming your tags index is 1 based
IF (<tag.Player_<dlocal.x>_Votes> > <dlocal.mostVotes>)
local.mostVotedPlayer=<dlocal.x>
local.mostVotes=<dtag.Player_<dlocal.x>_Votes>
ENDIF
ENDFOR
//the player with most votes was the candidate <dlocal.mostVotedPlayer> with <dlocal.mostVotes> votes
If there is a draw, the first player who signed to the vote list will be elected
---
You could try to resync the server, it should re-load your scripts
Feeh/Epila - Nightly releases / SphereWiki / Github Issues / Sphere's GitHub
(This post was last modified: 03-09-2014 11:17 PM by Feeh.)
|
|
03-09-2014 11:16 PM |
|
|
Messages In This Thread |
RE: Tags Comparison & Region - Feeh - 03-09-2014 11:16 PM
|
User(s) browsing this thread: 1 Guest(s)