Vote Checker & Rewarder

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

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

5/5, 12 likes
  1. I noticed in the logs (stupidly over looked it before) the following debug event after the NRE.

    Code:
    1:10 PM [Debug]   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__AnonStorey3.<>m__1 (Int32 code, System.String response) [0x00000] in <filename unknown>:0
      at Oxide.Core.Libraries.WebRequests+WebRequest.<OnComplete>m__1 () [0x00000] in <filename unknown>:0 
    Let me know if you still need full logs.
     
  2. Yes please. Need to know everything. The actually error doesn't give me any info to work with, I need to see everything that gets printed to the log from the plugin. Please install the attached version, and afterwards pm me the entire log.
     

    Attached Files:

  3. Running your latest debug building I see the following in RCON logs:

    [Oxide] 8:22 PM [Error] Web request callback raised an exception in 'VoteChecker v2.1.0' plugin (NullReferenceException: Object reference not set to an instance of an object)
    [Oxide] 8:22 PM [Debug] 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__AnonStorey3.<>m__1 (Int32 code, System.String response) [0x00000] in <filename unknown>:0
    at Oxide.Core.Libraries.WebRequests+WebRequest.<OnComplete>m__1 () [0x00000] in <filename unknown>:0
     
  4. Installed the new plugin version after todays Dev Update (was not working prior anyways) Getting the same thing here:

    Code:
    3:54 AM [Warning] [VoteChecker] LF Passing: http://api.cyberscene.co.za/listforge/votechecker.php?steamid=765611981270XXXXX&ver=2.1.0&api=p93tqk06set5z1x2t1nXXXXXXwq05mja61&mode=week&interval=1&platform=rust
    3:54 AM [Warning] [VoteChecker] Listforge votes is 2
    3:54 AM [Warning] [VoteChecker] Votecount passed to giveitems is 2
    3:54 AM [Error] Web request callback raised an exception (NullReferenceException: Object reference not set to an instance of an object)
    3:54 AM [Debug]   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__AnonStorey3.<>m__1 (Int32 code, System.String response) [0x00000] in <filename unknown>:0
      at Oxide.Core.Libraries.WebRequests+WebRequest.<OnComplete>m__1 () [0x00000] in <filename unknown>:0 
    *removed steamid and API from your GET request string.

    I did verify the URL request is returning valid data as shows in the preceding logs. Server response in my case is just "2".

    I flushed my logs and reloaded the plugin. It loads fine with no errors. /rewards working as it should, /getreward throws the above exception.

    VoteChecker.json
    Code:
    {
      "autoGive": "true",
      "serverApi": "p93tqk06set5z1x2t1nXXXXXXwq05mja61",
      "serverId": "61XXX",
      "trackingInterval": "1",
      "trackingType": "week"
    }
    VoteCheckerRewards.json
    Code:
    [
      {
        "itemName": "Supply Signal",
        "votesRequired": -1,
        "itemAmount": 1
      },
      {
        "itemName": "Blueprint Fragment",
        "votesRequired": 3,
        "itemAmount": 550
      },
      {
        "itemName": "Blueprint Library",
        "votesRequired": 5,
        "itemAmount": 5
      },
    ]
    VoteCheckerUserVotes.json is empty
     
  5. Thanks Guys, If you receive the webrequest error, please use the following.

    Please be patient while I sort out all the issues, the next update will be a fully working version. For now I will upload adhoc changes in this thread for people that are willing to help test to use it.
    [DOUBLEPOST=1455285667,1455265893][/DOUBLEPOST]For those willing, this should be a full working version
     

    Attached Files:

  6. Pho3niX90 updated Vote Checker & Rewarder with a new update entry:

    2.2.0

     
  7. It is working now :) way to go and thnx for this awesome plugin
     
  8. Any chance on this supporting Economy in the future? Votes = Server Monehs?
     
  9. Working great but the /rewards command seems to be missing now.
     
  10. use /voterewards, the summary needs to be updated
     
  11. Hi Olde.

    Yes sure. As soon as the plugin has not receive any error reports for 2 weeks I will implement it :)
     
  12. Looking forward to it :)
     
  13. {
    "autoGive": "true",
    "serverApi": "Got this",
    "serverId": "17851",
    "tgsAddress": "",
    "tgsApi": "",
    "trackingInterval": "1",
    "trackingType": "month"
    }

    How do you get your tgsAddress? and the tgsApi
     
  14. Go to game-servers.top and register your server, on my servers your api will be there. Add it ingame and it will automatically set your address as well
     
  15. I set up everything and I wrote /addreward "Supply Signal" 1 1 as the voting reward, but then when I voted and typed in chat /getreward it says that I've no rewards to claim.. any ideas?
     
    Last edited by a moderator: Feb 14, 2016
  16. Pho3niX90 updated Vote Checker & Rewarder with a new update entry:

    2.2.1


    [DOUBLEPOST=1455479643][/DOUBLEPOST]
    1 would be, if you have 1 vote and 1 vote only for your tracking interval, then you will recieve the item. Otherwise you receive nothing. If you have voted 10 times for your interval you will also receive nothing. If you want to give a supply signal for each vote then use -1
     
  17. with latest update 2.2.1 server spamming this periodically(it can be 2 seconds or 3 minutes):
    [Oxide] 8:07 PM [Warning] [VoteChecker] 0
    [Oxide] 8:07 PM [Warning] [VoteChecker] 1
    [Oxide] 8:07 PM [Warning] [VoteChecker] 2
    [Oxide] 8:07 PM [Warning] [VoteChecker] 2/14/2016 8:21:27 PM 2/14/2016 8:07:28 PM
    [Oxide] 8:07 PM [Warning] [VoteChecker] 3
    [Oxide] 8:07 PM [Warning] [VoteChecker] 4
     
  18. Yeah that is debug code, nothing to worry about. Each update I leave debug code in for if something goes wrong on someone elses server, I would know what causes it. Will remove in next minor update.
     
  19. I have it set to each vote you get a small present, however the votes aren't going through. I used /addreward "Small Present" 1 -1. It said in the console that the gameservers setup is complete, yet when I vote and do /getreward, there's no message. There's just this console error every time. I went ahead and crossed out the API keys, though. If you need those just let me know. Any insight is appreciated.
     
  20. Thank you.

    Could you please send the files related to votechecker via PM, I will be better able to assist you.