IndexOutOfRangeException at GaveRewardsError
Web request callback raised an exception (IndexOutOfRangeException: Index was outside the bounds of the array.)
  at Oxide.Plugins.EasyVote.GaveRewards (BasePlayer player, System.Collections.Generic.List`1[T] rewardValue) [0x0002a] in <3a8d2a27bafa46268d76c67cffa46bea>:0 
  at Oxide.Plugins.EasyVote.RewardHandler (BasePlayer player, System.String serverName) [0x00230] in <3a8d2a27bafa46268d76c67cffa46bea>:0 
  at Oxide.Plugins.EasyVote.ClaimReward (System.Int32 code, System.String response, BasePlayer player, System.String url, System.String serverName) [0x0012e] in <3a8d2a27bafa46268d76c67cffa46bea>:0 
  at Oxide.Plugins.EasyVote+<cmdClaim>c__AnonStorey3.<>m__0 (System.Int32 code, System.String response) [0x0002e] in <3a8d2a27bafa46268d76c67cffa46bea>:0 
  at Oxide.Core.Libraries.WebRequests+WebRequest.<OnComplete>b__42_0 () [0x00034] in <4452f821def6406d834e4149849fe7ea>:0
My config ...
{
  "Commands": {
    "oxidegrantgroup": "oxide.usergroup add {playerid} {value}",
    "oxidegrantperm": "oxide.grant user {playerid} {value}",
    "oxiderevokegroup": "oxide.usergroup remove {playerid} {value}",
    "oxiderevokeperm": "oxide.revoke user {playerid} {value}",
    "rp": "sr add {playerid} {value}",
    "tempaddgroup": "addgroup {playerid} {value} {value2}",
    "tempgrantperm": "grantperm {playerid} {value} {value2}",
    "zlvl-*": "zl.lvl {playerid} * +{value}",
    "zlvl-c": "zl.lvl {playerid} C +{value}",
    "zlvl-m": "zl.lvl {playerid} M +{value}",
    "zlvl-s": "zl.lvl {playerid} S +{value}",
    "zlvl-wc": "zl.lvl {playerid} WC +{value}"
  },
  "Discord": {
    "Discord webhook (URL)": "",
    "DiscordMessage Enabled (true / false)": "false",
    "Enable @here alert (true / false)": "false",
    "Title": "Vote"
  },
  "Rewards": {
    "@": [
      "supply.signal: 1",
      "zlvl-*: 1"
    ],
    "first": [
      "rp 50",
    ],
    "vote2": [
      "rp 60"
    ],
    "vote3": [
      "rp 70"
    ],
    "vote4": [
      "rp 80"
    ],
    "vote5": [
      "rp 90"
    ],
    "vote6": [
      "rp 100"
    ],
    "vote7": [
      "rp 110"
    ],
    "vote8": [
      "rp 120"
    ],
    "vote9": [
      "rp 150"
    ],
    "vote10": [
      "rp: 200",
      "clatter.helmet: 1"
    ],
    "vote15": [
      "rp 300",
	  "scientistsuit_heavy: 1"
    ],
    "vote20": [
      "ro 500",
      "electric.generator.small: 1"
    ]
  },
  "Servers": {
    "Zombie Nation PVE": {
      "RustServers": "149102:0h9C5LfMvgTYKIsILKNTPndfverfZQaBgE"
    },
    "Zombie Nation PVP - Terminus": {
      "RustServers": "149889:wESPJ2MUwNHszYWqXNPT1Lt1SiXFice8eL8"
    }
  },
  "Settings": {
    "Enable logging => oxide/logs/EasyVote (true / false)": "true",
    "Globally announcment in chat when player voted (true / false)": "true",
    "Prefix": "<color=#00bfff>[Vote]</color>",
    "Send thank you message to player who voted (true / false)": "true",
    "Vote rewards cumulative (true / false)": "false"
  },
  "VoteSitesAPI": {
    "RustServers": {
      "API Claim Reward (GET URL)": "http://rust-servers.net/api/?action=custom&object=plugin&element=reward&key={0}&steamid={1}",
      "API Vote status (GET URL)": "http://rust-servers.net/api/?object=votes&element=claim&key={0}&steamid={1}",
      "Vote link (URL)": "http://rust-servers.net/server/{0}"
    }
  }
}​
Hey - Trying to set this up and not sure what I did wrong for the error:
Changes for 'Irish': (Woodcutting > 2) (Mining > 2) (Skinning > 2) (Acquire > 2)
(20:47:35) | [Oxide] 21:47 [Error] Web request callback raised an exception (IndexOutOfRangeException: Index was outside the bounds of the array.)
  at Oxide.Plugins.EasyVote.GaveRewards (BasePlayer player, System.Collections.Generic.List`1[T] rewardValue) [0x0002a] in <13bb2e65e5ec4875a440cc51228a30fd>:0 
  at Oxide.Plugins.EasyVote.RewardHandler (BasePlayer player, System.String serverName) [0x00230] in <13bb2e65e5ec4875a440cc51228a30fd>:0 
  at Oxide.Plugins.EasyVote.ClaimReward (System.Int32 code, System.String response, BasePlayer player, System.String url, System.String serverName) [0x0012e] in <13bb2e65e5ec4875a440cc51228a30fd>:0 
  at Oxide.Plugins.EasyVote+<cmdClaim>c__AnonStorey3.<>m__0 (System.Int32 code, System.String response) [0x0002e] in <13bb2e65e5ec4875a440cc51228a30fd>:0 
  at Oxide.Core.Libraries.WebRequests+WebRequest.<OnComplete>b__42_0 () [0x00034] in <4452f821def6406d834e4149849fe7ea>:0​

I'm just trying to figure out the format for the first one then I can go from there. It seems it gaver me the zlvl, however, it did not give the RP.

"Rewards": {
    "@": [
      "zlvl-*: 1"
    ],
    "first": [
      ""
    ],
    "vote1": [
      "rp: 50",
      "@"
    ],


Hello guys,

I have a probleme with EasyVote, when i vote on my rust-server.net then i used cmd /claim, i have this in my console server :

at Oxide.Plugins.EasyVote.ClaimReward (System.Int32 code, System.String response, BasePlayer player, System.String url, System.String serverName) [0x000e8] in <9e4414f02ec74918aa3257a2329003f6>:0

at Oxide.Plugins.EasyVote+<cmdClaim>c__AnonStorey3.<>m__0 (System.Int32 code, System.String response) [0x0002e] in <9e4414f02ec74918aa3257a2329003f6>:0

at Oxide.Core.Libraries.WebRequests+WebRequest.<OnComplete>b__42_0 () [0x00034] in <ac41dd3599754d448b8c218b34645820>:0

Dont know why i get this error. Anyone know what to do?

09:39 [Error] Web request callback raised an exception (IndexOutOfRangeException: Index was outside the bounds of the array.)
at Oxide.Plugins.EasyVote.GaveRewards (BasePlayer player, System.Collections.Generic.List`1[T] rewardValue) [0x0002a] in <39551b07f92d4c88950a4fe41001e564>:0

at Oxide.Plugins.EasyVote.RewardHandler (BasePlayer player, System.String serverName) [0x00259] in <39551b07f92d4c88950a4fe41001e564>:0

at Oxide.Plugins.EasyVote.ClaimReward (System.Int32 code, System.String response, BasePlayer player, System.String url, System.String serverName) [0x0012e] in <39551b07f92d4c88950a4fe41001e564>:0

at Oxide.Plugins.EasyVote+<cmdClaim>c__AnonStorey3.<>m__0 (System.Int32 code, System.String response) [0x0002e] in <39551b07f92d4c88950a4fe41001e564>:0

at Oxide.Core.Libraries.WebRequests+WebRequest.<OnComplete>b__42_0 () [0x00034] in <50629aa0e75d4126b345d8d9d64da28d>:0

09:55 [Info] [FancyDrop] SupplySignal thrown by '...' at: (-59.8, 7.0, -441.9)
09:56 [Info] [FancyDrop] ... (7656.........) looted the Drop at: (-43, 11, -451) grid area: N17

one of the vote sites is no more... please check your sites and update your config

This keeps showing up in my server console.

06:58 [Error] Web request callback raised an exception (IndexOutOfRangeException: Index was outside the bounds of the array.)
at Oxide.Plugins.EasyVote.GaveRewards (BasePlayer player, System.Collections.Generic.List`1[T] rewardValue) [0x0002a] in <143cf23b81d543368fcb274ed4323377>:0

at Oxide.Plugins.EasyVote.RewardHandler (BasePlayer player, System.String serverName) [0x00230] in <143cf23b81d543368fcb274ed4323377>:0

at Oxide.Plugins.EasyVote.ClaimReward (System.Int32 code, System.String response, BasePlayer player, System.String url, System.String serverName) [0x0012e] in <143cf23b81d543368fcb274ed4323377>:0

at Oxide.Plugins.EasyVote+<cmdClaim>c__AnonStorey3.<>m__0 (System.Int32 code, System.String response) [0x0002e] in <143cf23b81d543368fcb274ed4323377>:0

at Oxide.Core.Libraries.WebRequests+WebRequest.<OnComplete>b__42_0 () [0x00034] in <46ff2b534abb4b35952608167523b7ec>:0
Seems to be new, post July 2022 patch.

Its not caused of an offline vote site. I use only rust-servers net and they are online.
It works but every time someone vote, claim and trow the signal this appears.
I also tryed to delete server 2 and 3 from config but the message is still there.

"Servers": {
"........": {
"Rust-Servers.net": "165...:ZWVOIxL8f6LZ9cHEJSZnF.........."
},
"ServerName2": {
"Rust-Servers.info": "ID:KEY"
},
"ServerName3": {
"BestServers.com": "ID:KEY"
},
},
"Settings": {
"Enable logging => oxide/logs/EasyVote (true / false)": "true",
"Globally announcment in chat when player voted (true / false)": "true",
"Prefix": "<color=#7c3da1>[Vote]</color>",
"Send thank you message to player who voted (true / false)": "true",
"Vote rewards cumulative (true / false)": "false"
},
"VoteSitesAPI": {
"BestServers.com": {
"API Claim Reward (GET URL)": "https://bestservers.com/api/vote.php?action=claim&key={0}&steamid={1}",
"API Vote status (GET URL)": "https://bestservers.com/api/vote.php?action=status&key={0}&steamid={1}",
"Vote link (URL)": "https://bestservers.com/server/{0}"
},
"Rust-Servers.info": {
"API Claim Reward (GET URL)": "https://api.rust-servers.info/votesclime/?key={0}&steamid={1}",
"API Vote status (GET URL)": "https://api.rust-servers.info/votescheckclime/?key={0}&steamid={1}",
"Vote link (URL)": "http://rust-servers.info/server/id-{0}.html"
},
"Rust-Servers.net": {
"API Claim Reward (GET URL)": "http://rust-servers.net/api/?action=custom&object=plugin&element=reward&key={0}&steamid={1}",
"API Vote status (GET URL)": "http://rust-servers.net/api/?object=votes&element=claim&key={0}&steamid={1}",
"Vote link (URL)": "http://rust-servers.net/server/{0}"
}

thanks omega

Merged post

I can say, the three sites I use are Tracky, Rust Servers and Best Servers, and they are all online accepting votes.

kLVm5osFBKCZDp1.png MikeHawke

one of the vote sites is no more... please check your sites and update your config

You are right, Rust-Servers.info is offline. But here is my new config without Server two and tree.

"Servers": {
    "...": {
      "...": "165943:ZWVOIxL8f6LZ9cHEJ..."
    },
  },
  "Settings": {
    "Enable logging => oxide/logs/EasyVote (true / false)": "true",
    "Globally announcment in chat when player voted (true / false)": "true",
    "Prefix": "<color=#7c3da1>[Vote]</color>",
    "Send thank you message to player who voted (true / false)": "true",
    "Vote rewards cumulative (true / false)": "false"
  },
  "VoteSitesAPI": {
    "Rust-Servers.net": {
      "API Claim Reward (GET URL)": "http://rust-servers.net/api/?action=custom&object=plugin&element=reward&key={0}&steamid={1}",
      "API Vote status (GET URL)": "http://rust-servers.net/api/?object=votes&element=claim&key={0}&steamid={1}",
      "Vote link (URL)": "http://rust-servers.net/server/{0}"
    }
  }
}

Error appears and i also delete these lines in cs file

{ "ServerName2", new Dictionary<string, string>() { { "Rust-Servers.info", "ID:KEY" } } },

and

{ "Rust-Servers.info",
                       new Dictionary<string, string>() {
                           { PluginSettings.apiClaim, "https://api.rust-servers.info/votesclime/?key={0}&steamid={1}" },
                           { PluginSettings.apiStatus, "https://api.rust-servers.info/votescheckclime/?key={0}&steamid={1}" },
                           { PluginSettings.apiLink, "http://rust-servers.info/server/id-{0}.html" }
                       }
                    },

Error message still there but the plugin works.