ServerRewards

Moved

Total Downloads: 14,028 - First Release: Mar 2, 2016 - Last Update: Jun 9, 2018

5/5, 61 likes
  1. Yeah, getting a similar message and also:-
    Code:
    Failed to call hook 'cmdStore' on plugin 'ServerRewards v0.4.65' (KeyNotFoundException: The given key was not present in the dictionary.)
      at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <e1a80661d61443feb3dbdaac88eeb776>:0
      at Oxide.Plugins.ServerRewards+UIManager.AddUI (BasePlayer player, Oxide.Plugins.ServerRewards+UIPanel type, Oxide.Plugins.ServerRewards+Category subType, System.Int32 pageNumber, System.String npcId) [0x0011d] in <aab12c0f53ff421f815fd3ff6169419c>:0
      at Oxide.Plugins.ServerRewards.OpenStore (BasePlayer player, System.String npcid) [0x000a9] in <aab12c0f53ff421f815fd3ff6169419c>:0
      at Oxide.Plugins.ServerRewards.cmdStore (BasePlayer player, System.String command, System.String[] args) [0x00036] in <aab12c0f53ff421f815fd3ff6169419c>:0
      at Oxide.Plugins.ServerRewards.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0120e] in <aab12c0f53ff421f815fd3ff6169419c>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <17b9f46063fe4ac9ae4a1000712647ce>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <ba44835247a74c58bf6cabef8b441b56>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <ba44835247a74c58bf6cabef8b441b56>:0
     
  2. as it was mentioned above I just disabled Kits tab and kits description and now store works alright
     
  3. do your pictures work in your store?
     
  4. Yes most, only missing like , pickles and something else but then again I don't have loads of things in my store
     
  5. How should i call hooks now?
     
  6. Wulf

    Wulf Community Admin

    Hook calling hasn't changed. What exactly is your issue?
     
  7. > ServerRewards.Call("TakePoints", new object[] { player.userID, price });
    Stopped working after update > Use string method for Economics call to fix Oxide calling wrong hook signature

    Other methods are working fine.

    No errors in console, and if i added Puts("1"); in first string of TakePoints method, i dont get anything in console.
     
  8. Wulf

    Wulf Community Admin

    Technically that example was never right, it just worked that way months back before hook overloading was introduced. There's absolutely not need to create a new object[] when calling hooks like that; just pass the correct arguments that the plugin expects.

    So for "TakePoints", you'd need to pass a ulong and an int (make sure it's an int).
    Code:
    object TakePoints(ulong playerID, int amount)
    For some reason plugins were allowed to be a bit more flexible before the update from .NET 3.5 to .NET 4.6, so a lot of plugins broke that were not calling with the correct arguments (ie. float instead of double, int instead of ulong, etc.)
     
  9. Without object it is not working also.
    But this, for example is working fine.
    upload_2018-6-11_23-17-20.png
     
  10. Wulf

    Wulf Community Admin

    Sounds like you aren't passing an int for the 2nd arg then; ie. a double, float, or other numeric type where the plugin expects an int.
     
  11. Okay, will take a look into it, cause i am not able to test it myself (my mac can't start rust, server, and IDE at one time ;3)
    Thank you for your reply.
    [DOUBLEPOST=1528748452][/DOUBLEPOST]Yeah, it is right. For some reasons my prices in int, was'not recognised as int, when calling methods. So manually converting fix problem.
     
  12. since the update, nothing is appearing in my store, and even though I've removed the tabs beyond the items tab from showing up, they're all showing up, I've removed the data, removed the configs, what am I doing wrong?
     
  13. Wulf

    Wulf Community Admin

    Unfortunate side-effect of updating to .NET 4.6 along with Rust. I'm surprised it worked before though, as that was never intended or implemented. The only one we had accounted for manually was double <-> int.
     
  14. How do you add moire tabs to the item section? I want to add a tab for food but i cant figure out how.
    [DOUBLEPOST=1528934899][/DOUBLEPOST]Also, does anyone have a completed sale_data.json file with all the in-game items? I REALLY need one. Thanks!
     
  15. Code:
    Failed to run a 60.00 timer in 'ServerRewards v0.4.65' (KeyNotFoundException: The given key was not present in the dictionary.)
      at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <e1a80661d61443feb3dbdaac88eeb776>:0
      at Oxide.Plugins.ServerRewards.GetKitContents (System.String kitname) [0x000d9] in <cc052e5594e94ca5becc45fdb9650d8b>:0
      at Oxide.Plugins.ServerRewards.CreateKitsElement (System.Collections.Generic.List`1[T] kits, System.Int32 page, System.Boolean pageUp, System.Boolean pageDown, System.String npcId) [0x001b2] in <cc052e5594e94ca5becc45fdb9650d8b>:0
      at Oxide.Plugins.ServerRewards.CreateKitsUI (System.String npcId, Oxide.Plugins.ServerRewards+NPCData+NPCInfo npcInfo) [0x00107] in <cc052e5594e94ca5becc45fdb9650d8b>:0
      at Oxide.Plugins.ServerRewards.CreateNewElement (System.String npcId, Oxide.Plugins.ServerRewards+NPCData+NPCInfo info) [0x00022] in <cc052e5594e94ca5becc45fdb9650d8b>:0
      at Oxide.Plugins.ServerRewards.CreateAllElements () [0x00064] in <cc052e5594e94ca5becc45fdb9650d8b>:0
      at Oxide.Core.Libraries.Timer+TimerInstance.FireCallback () [0x00018] in <ba44835247a74c58bf6cabef8b441b56>:0
     
    Last edited by a moderator: Jun 14, 2018
  16. EDIT: right after I posted this, I noticed MimiV's fix. By disabling the kits tab and description, I can confirm that the other tabs have started working. Armed with this information I will now take it up in the Kits thread.
    Code:
    "Show kits tab": false,
    "Display kit contents as the description": false,
    ===========================================
    @k1lly0u We're having the same problem as Lana on the previous page. Some of the tabs aren't working. I've created a short 17 second video showing the problem.



    We think we're up to date with everything that might affect this, and I was hoping the updates would fix it, but no joy. Any ideas? Thanks.

    Code:
    Protocol: 2094.164.1
    Build Date: 06/11/2018 12:27:36
    Unity Version: 2018.1.0f2
    Changeset: 27259
    Branch: release
    Oxide.Rust 2.0.3965ServerRewards 0.4.65
    Rewards 1.3.14
    Kits 3.2.92
    ImageLibrary 2.0.42
     
    Last edited by a moderator: Jun 14, 2018
  17. how do you change the amount of RP you get?
     
  18. /rewards add kit is no work

    Failed to call hook 'cmdChangeElement' on plugin 'ServerRewards v0.4.65' (KeyNotFoundException: The given key was not present in the dictionary.)
    at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <e1a80661d61443feb3dbdaac88eeb776>:0
    at Oxide.Plugins.ServerRewards+UIManager.AddUI (BasePlayer player, Oxide.Plugins.ServerRewards+UIPanel type, Oxide.Plugins.ServerRewards+Category subType, System.Int32 pageNumber, System.String npcId) [0x0011d] in <481bf6aec8f64a59a7edb12a759826be>:0
    at Oxide.Plugins.ServerRewards+UIManager.SwitchElement (BasePlayer player, Oxide.Plugins.ServerRewards+UIPanel type, Oxide.Plugins.ServerRewards+Category subType, System.Int32 pageNumber, System.String npcId) [0x00008] in <481bf6aec8f64a59a7edb12a759826be>:0
    at Oxide.Plugins.ServerRewards.cmdChangeElement (ConsoleSystem+Arg arg) [0x00138] in <481bf6aec8f64a59a7edb12a759826be>:0
    at Oxide.Plugins.ServerRewards.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00fe2] in <481bf6aec8f64a59a7edb12a759826be>:0
    at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <09b255f9a88d4ffda4779759134e116d>:0
    at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <ba44835247a74c58bf6cabef8b441b56>:0
    at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <ba44835247a74c58bf6cabef8b441b56>:0
     
  19. @k1lly0u is it possible to tell the rewards shop to only use the economics money? I downloading you plugin souly for the shop since i think its the best shop availible. I use the economics for other stuff and dont want to force people to exchange their money for reward points ti be able to buy stuff.
    Is it possible to set the plugin to only use the economy for buying / selling?
     
  20. Is there a way to combine commands?

    For instance, let's say you want to give someone the ability to use a command and then say something to the server.

    command & chat.say "hello"

    Can you do that?

    I tried

    command; chat.say hello

    but it didn't seem to work.