Vote Checker & Rewarder

Give rewards to users for voting on game-servers.top & rust-servers.net

Total Downloads: 1,948 - First Release: Jul 12, 2015 - Last Update: Feb 15, 2016

5/5, 12 likes
  1. Pho3niX90 submitted a new resource:

    Vote Checker - Give rewards to users for voting on rust-servers.net

    Read more about this resource...
     
  2. Code:
    [Oxide] 12:57 AM [Error] Exception raised in web request callback (KeyNotFoundException: The given key was not present in the dictionary.)
    [Oxide] 12:57 AM [Debug]   at System.Collections.Generic.Dictionary`2[System.String,System.String].get_Item (System.String key) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.VoteChecker.giveItems (.BasePlayer player, Int32 voteCount) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.VoteChecker.WebRequestCallback (Int32 code, System.String response, .BasePlayer player) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.VoteChecker+<GetRewardsForThisPlayer>c__AnonStorey1.<>m__0 (Int32 code, System.String response) [0x00000] in <filename unknown>:0
      at Oxide.Core.Libraries.WebRequests+WebRequest.<OnComplete>m__1 () [0x00000] in <filename unknown>:0 
    what does this mean ?
    [DOUBLEPOST=1436715188][/DOUBLEPOST]
    Code:
    [Oxide] 1:31 AM [Error] Failed to call hook 'addNewReward' on plugin 'VoteChecker' (FormatException: Input string was not in the correct format)
    [Oxide] 1:31 AM [Debug]   at System.Int32.Parse (System.String s) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.VoteChecker.Loaded () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.VoteChecker.ReLoad () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.VoteChecker.addNewReward (.BasePlayer player, System.String cmd, System.String[] input) [0x00000] in <filename unknown>:0
      at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
      at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
    [Oxide] 1:31 AM [Info] [BetterLoot] BetterLoot: Refreshed 3 containers (0 destroyed)
    [Oxide] 1:32 AM [Info] [BetterLoot] BetterLoot: Refreshed 6 containers (0 destroyed)
     
  3. Getting the same and nobody has successfully received their reward yet
     
  4. mine works its just i cant seem to edit or add more items to the vote list.. it lists as rewards but then gets taken off after a while..
     
  5. I will have a look at this and add a proper catch/error message. Basically it means that the item you wanted to add wasn't found. What was it exactly?
    [DOUBLEPOST=1436775385][/DOUBLEPOST]
    Hi Meat,

    Have you added rewards for other vote counts as well? The default is to give rewards for people with 1 votes, you have to add more rewards based on your personal preference. If you add voteneeded as -1 then it will reward for every vote
    [DOUBLEPOST=1436775430][/DOUBLEPOST]
    Hi Andie.

    Did you edit the file manually? Could you please explain more the issue you are facing?
     
  6. umm when i do
    /addreward itemname rewardamount votecountneeded

    it doesn't save... it clears it out after a while.
     
  7. Okay I will investigate why this is happening but it shouldn't be happening.

    Do you know when it clears out? After a restart or a certain amount of time? Also is it for certain items or all reward items? If you are not sure it's okay. Busy looking at the other issues now as well
     
    Last edited by a moderator: Jul 13, 2015
  8. all rewards, except the ones that are in the data file.. as they stay there cannot add anything else to it after awhile it will just dissapare from the /rewards command
     
  9. Okay I will investigate now what could be causing this,
     
  10. Pho3niX90 updated Vote Checker with a new update entry:

    Important update


    [DOUBLEPOST=1436802487][/DOUBLEPOST]@Andie Please test the new version. I found a bug where the dictionary got unloaded after adding items. Please also clear the rewards file and readd your items for safety.
    [DOUBLEPOST=1436802546][/DOUBLEPOST]@MeatCircus I have added a step to write to the log file when a user ha votes but your file doesn't have rewards.
     
  11. testing now :) thank you !
     
  12. Let me know the outcome.
     
  13. Working now, getting occasional webrequest exceptions in the console since installing but it works
    [DOUBLEPOST=1436833372,1436819265][/DOUBLEPOST]Well it was working, not now.
    Code:
    7:14 PM [Error] Exception raised in web request callback (NullReferenceException: Object reference not set to an instance of an object)
    7:14 PM [Debug]  at BasePlayer.SendConsoleCommand (System.String command, System.Object[] obj) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.RustPlugin.PrintToChat (.BasePlayer player, System.String format, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.RustPlugin.SendReply (.BasePlayer player, System.String format, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.VoteChecker.giveItems (.BasePlayer player, Int32 voteCount) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.VoteChecker.WebRequestCallback (Int32 code, System.String response, .BasePlayer player) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.VoteChecker+<GetRewardsForThisPlayer>c__AnonStorey1.<>m__0 (Int32 code, System.String response) [0x00000] in <filename unknown>:0
      at Oxide.Core.Libraries.WebRequests+WebRequest.<OnComplete>m__1 () [0x00000] in <filename unknown>:0
    7:14 PM [Error] Exception raised in web request callback (NullReferenceException: Object reference not set to an instance of an object)
    7:14 PM [Debug]  at BasePlayer.SendConsoleCommand (System.String command, System.Object[] obj) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.RustPlugin.PrintToChat (.BasePlayer player, System.String format, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.RustPlugin.SendReply (.BasePlayer player, System.String format, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.VoteChecker.giveItems (.BasePlayer player, Int32 voteCount) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.VoteChecker.WebRequestCallback (Int32 code, System.String response, .BasePlayer player) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.VoteChecker+<GetRewardsForThisPlayer>c__AnonStorey1.<>m__0 (Int32 code, System.String response) [0x00000] in <filename unknown>:0
      at Oxide.Core.Libraries.WebRequests+WebRequest.<OnComplete>m__1 () [0x00000] in <filename unknown>:0
     
    Last edited by a moderator: Jul 14, 2015
  14. Awesome. I will look into that error and release a fix.
     
  15. Any progress? Would love to be using this but it stops working after just a few hours
     
  16. Hi Meat.

    Do you have any other errors except the one pasted above?
     
  17. I havent had it installed since then because only the 1st couple people got the reward then it stopped giving it to people that voted
     
  18. Okay, please send me your \oxide\data\VoteCheckerRewards.json file so that I can have a look.
    Also, your rust-servers link or last 5 digits of api.
    [DOUBLEPOST=1437152334][/DOUBLEPOST]Also just check for any lines that contain "WARNING!:"