Jump to content

Error RoadBradleyConsoleCommand

Closed 1.3.0 1.3.3

Ondraasek
Ondraasek

Posted

Hi,

any idea why I am getting this?

Failed to call hook 'RoadBradleyConsoleCommand' on plugin 'RoadBradley v1.3.0' (ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index)
at System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) [0x00029] in <fb001e01371b4adca20013e0ac763896>:0
at System.ThrowHelper.ThrowArgumentOutOfRangeException () [0x00000] in <fb001e01371b4adca20013e0ac763896>:0
at Oxide.Plugins.RoadBradley.TryPurchaseTank (BasePlayer player, System.String profile) [0x00193] in <3e102e9e6e90495c85380f55e5809afa>:0
at Oxide.Plugins.RoadBradley.RoadBradleyConsoleCommand (ConsoleSystem+Arg arg) [0x0011f] in <3e102e9e6e90495c85380f55e5809afa>:0
at Oxide.Plugins.RoadBradley.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00c77] in <3e102e9e6e90495c85380f55e5809afa>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <09575a60985045248bcb43b20faeeb99>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <bae5f1223fce49c493b01571c99dce02>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <bae5f1223fce49c493b01571c99dce02>:0

 

thanks a lot

ThePitereq

Posted

Hey. Yeah, possible bug. Will be fixed in 1.3.1 that will come out max tommorow with few more improvements!
Will ping here and close a ticket when it;s done.

Ondraasek

Posted

let me know once finished, players cant wait 😄 thanks a lot

ThePitereq

Posted

Hey. Sorry for delay. Found new bugs today. Need to be sure that everything is okay ^^

ThePitereq

Posted

Hey! Problem should be solved in 1.3.1. Please answer here if your problem is fixed! 🙂

Ondraasek

Posted

No sorry, I let it create new config and when I try to purchase tank igame it says:

09/16 15:09:59 | Failed to call hook 'RoadBradleyConsoleCommand' on plugin 'RoadBradley v1.3.1' (KeyNotFoundException: The given key was not present in the dictionary.)
at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <fb001e01371b4adca20013e0ac763896>:0
at Oxide.Plugins.RoadBradley.TryPurchaseTank (BasePlayer player, System.String profile) [0x000c2] in <f93f85b030f94e688d14cc35de811ff2>:0
at Oxide.Plugins.RoadBradley.RoadBradleyConsoleCommand (ConsoleSystem+Arg arg) [0x0011f] in <f93f85b030f94e688d14cc35de811ff2>:0
at Oxide.Plugins.RoadBradley.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00c77] in <f93f85b030f94e688d14cc35de811ff2>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <09575a60985045248bcb43b20faeeb99>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <bae5f1223fce49c493b01571c99dce02>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <bae5f1223fce49c493b01571c99dce02>:0

 

pls advise thanks

Ondraasek

Posted

{

  "Tank Purchase - Commands": [

    "buytank"

  ],

  "Tank Route - Display every X checkpoint (Command)": 1,

  "Tank Route - Use Asphalt Roads Only": false,

  "Tank Route - Height Offset": 1.0,

  "Tank Route - Check for Map Obstacles (recommended for custom maps with prefabs on roads)": false,

  "Tank Route - Remove Roads With Obstacles From Pool": false,

  "Tank Route - Kill/Teleport Bradley after X Stuck Errors (0, to disable)": 0,

  "Tank Route - Stuck Fix Method (true = kill, false = teleport to start)": false,

  "Tank Route - Broadcast Stuck To Fighters": true,

  "Tank Route - Randomize Spawn On Road": true,

  "Tank Route - Remove Timed-Event Roads From Purchasable Pool": false,

  "Tank Route - Obstacle Keyword Whitelist": [

    "roadsign",

    "train_track",

    "road_tunnel",

    "doorcloser"

  ],

  "Tank Route - Remove first and last checkpoints of purchased bradleys": 3,

  "Tank Route Editor - Height Offset": 1.0,

  "Targeting - Target NPC": false,

  "Loot & Damage Share - Ignore Ownership Checks": true,

  "Loot & Damage Share - Use Friends": true,

  "Loot & Damage Share - Use Clans": false,

  "Loot & Damage Share - Use RUST Teams": true,

  "Loot & Damage Share - Limit Server Spawned Bradleys Loot To Top Damage Player": false,

  "Purchases - Used Purchase System (0 - None, 1 - Economics, 2 - ServerRewards)": 0,

  "Purchases - Max Purchased Bradleys (0, to disable)": 3,

  "Tank Target - Target Sleepers": false,

  "Tank Info - Display Timed Bradley Info": true,

  "Tank Info - Timed Bradley Info Format": "-=BRADLEY=-\nTier: {0}",

  "Tank Info - Display Purchased Bradley Info": true,

  "Tank Info - Purchased Bradley Info Format": "-=BRADLEY=-\nTier: {0}\nOwner: {1}",

  "Bag Respawns - Enabled": true,

  "Bag Respawns - Max Bags Per Player": 4,

  "Bag Respawns - Max Bed Distance From Player": 100.0,

  "Tank Unstuck - Killed Entity Names": [

    "servergibs_bradley",

    "scraptransporthelicopter",

    "magnetcrane.entity",

    "minicopter.entity",

    "supply_drop"

  ],

  "Tank Routes - Spawns Per Maps": {

    "default": [

      "default"

    ],

    "Detroit": [

      "default",

      "custom"

    ],

    "HapisIsland": [

      "hapis"

    ],

    "ParadiseIsland": [

      "custom"

    ]

  },

  "Tank Routes - Purchasable Road ID Blacklist Per Map": {

    "default": [

      0,

      3

    ],

    "Detroit": [

      1

    ]

  },

  "Tank Routes - Custom Purchasable Roads Per Map": {

    "default": [

      "CustomRoad1",

      "CustomRoad2"

    ],

    "Detroit": [

      "DetroitRoad1",

      "DetroitRoad2",

      "DetroitRoad3"

    ],

    "HapisIsland": [

      "HapisRoad2",

      "HapisRoad3",

      "HapisRoad4"

    ]

  },

  "Tank Routes - Spawn Configuration": {

    "custom": {

      "Tank Route - Road IDs (Random, if more than one)": [

        [

          "0",

          "1"

        ],

        [

          "2",

          "3"

        ]

      ],

      "Tank Route - Use all default roads": false,

      "Tank Route - Use longest path": false,

      "Tank Route - Remove first and last checkpoints": 3,

      "Spawns - Announce Spawn": true,

      "Spawns - Announce Kill": true,

      "Spawns - Respawn Time (in seconds)": 1200,

      "Spawns - Respawn Time Randomize Value (goes +value and -value from option above)": 120,

      "Spawns - Min. Online Players For Each Tank Amount (Amount Of Tanks: Amount Of Players)": {

        "1": 4,

        "2": 12,

        "3": 20

      },

      "Spawns - Chance": {

        "Extreme": 1,

        "Hard": 3

      }

    },

    "default": {

      "Tank Route - Road IDs (Random, if more than one)": [],

      "Tank Route - Use all default roads": false,

      "Tank Route - Use longest path": true,

      "Tank Route - Remove first and last checkpoints": 3,

      "Spawns - Announce Spawn": true,

      "Spawns - Announce Kill": true,

      "Spawns - Respawn Time (in seconds)": 900,

      "Spawns - Respawn Time Randomize Value (goes +value and -value from option above)": 120,

      "Spawns - Min. Online Players For Each Tank Amount (Amount Of Tanks: Amount Of Players)": {

        "1": 4,

        "2": 8

      },

      "Spawns - Chance": {

        "Hard": 2,

        "Normal": 5

      }

    },

    "hapis": {

      "Tank Route - Road IDs (Random, if more than one)": [

        [

          "HapisRoad1"

        ]

      ],

      "Tank Route - Use all default roads": false,

      "Tank Route - Use longest path": false,

      "Tank Route - Remove first and last checkpoints": 3,

      "Spawns - Announce Spawn": true,

      "Spawns - Announce Kill": true,

      "Spawns - Respawn Time (in seconds)": 900,

      "Spawns - Respawn Time Randomize Value (goes +value and -value from option above)": 120,

      "Spawns - Min. Online Players For Each Tank Amount (Amount Of Tanks: Amount Of Players)": {

        "1": 4,

        "2": 8

      },

      "Spawns - Chance": {

        "Hard": 2,

        "Normal": 5

      }

    }

  },

  "Tank Routes - Purchasable": {

    "Extreme": {

      "Purchases - Required Permission (leave blank, to disable)": "roadbradley.extreme",

      "Purchases - Cooldown (in seconds, 0 to disable)": 300,

      "Purchases - Max Daily (in seconds, 0 to disable)": 15,

      "Purchases - Time To Kill (in seconds, 0 to disable)": 1200,

      "Purchases - Time To Come To Bradley (Kill Time + Coming Time)": 600,

      "Purchases - Limit Loot To Team": true,

      "Purchases - Limit Target To Team": true,

      "Purchases - Limit Damage To Team": true,

      "Purchases - Kill Announce Enabled": true,

      "Purchases - Announce Kill To Fighters Only": true,

      "Purchases - Required Items": [

        {

          "Shortname": "scrap",

          "Amount": 1,

          "Skin": 0,

          "Display Name": ""

        }

      ]

    },

    "Hard": {

      "Purchases - Required Permission (leave blank, to disable)": "",

      "Purchases - Cooldown (in seconds, 0 to disable)": 300,

      "Purchases - Max Daily (in seconds, 0 to disable)": 25,

      "Purchases - Time To Kill (in seconds, 0 to disable)": 800,

      "Purchases - Time To Come To Bradley (Kill Time + Coming Time)": 600,

      "Purchases - Limit Loot To Team": true,

      "Purchases - Limit Target To Team": true,

      "Purchases - Limit Damage To Team": true,

      "Purchases - Kill Announce Enabled": true,

      "Purchases - Announce Kill To Fighters Only": true,

      "Purchases - Required Items": [

        {

          "Shortname": "scrap",

          "Amount": 1,

          "Skin": 0,

          "Display Name": ""

        }

      ]

    },

    "Normal": {

      "Purchases - Required Permission (leave blank, to disable)": "",

      "Purchases - Cooldown (in seconds, 0 to disable)": 1,

      "Purchases - Max Daily (in seconds, 0 to disable)": 40,

      "Purchases - Time To Kill (in seconds, 0 to disable)": 600,

      "Purchases - Time To Come To Bradley (Kill Time + Coming Time)": 600,

      "Purchases - Limit Loot To Team": true,

      "Purchases - Limit Target To Team": true,

      "Purchases - Limit Damage To Team": true,

      "Purchases - Kill Announce Enabled": true,

      "Purchases - Announce Kill To Fighters Only": true,

      "Purchases - Required Items": [

        {

          "Shortname": "scrap",

          "Amount": 1,

          "Skin": 0,

          "Display Name": ""

        }

      ]

    }

  },

  "Tank Routes - Configuration": {

    "Extreme": {

      "Tank Target - Max distance to target": 10.0,

      "Tank Target - Max clothing amount": 4.0,

      "Tank Target - Targeted items": [

        "rocket.launcher",

        "explosive.timed",

        "explosive.satchel"

      ],

      "Tank Options - Model Scale": 0.7,

      "Tank Options - Map Marker Type (None/Crate/Chinook/Cargoship)": "Crate",

      "Tank Options - Move Speed (0-1)": 1.0,

      "Tank Options - Move Force": 2000.0,

      "Tank Options - Health": 5000.0,

      "Tank Options - View Range": 75.0,

      "Turret Options - Fire Rate": 0.06,

      "Turret Options - Burst Length": 15,

      "Turret Options - Aim Cone": 3.0,

      "Turret Options - Bullet Damage": 25.0,

      "Bradley Debris - Scale With Tank": true,

      "Bradley Debris - Health": 500.0,

      "Bradley Debris - Time To Cool Down": 60.0,

      "Loot - Crate Amount (If default loot preset)": 4,

      "Loot - Used Loot Preset (leave blank for default)": "custom",

      "Loot - Rewards For Damage Dealt": [

        {

          "Shortname": "supply.signal",

          "Amount": 25,

          "Skin": 0,

          "Display Name": ""

        }

      ],

      "Loot - Fire Lock Time (in seconds)": 60

    },

    "Hard": {

      "Tank Target - Max distance to target": 10.0,

      "Tank Target - Max clothing amount": 4.0,

      "Tank Target - Targeted items": [

        "rocket.launcher",

        "explosive.timed",

        "explosive.satchel"

      ],

      "Tank Options - Model Scale": 0.6,

      "Tank Options - Map Marker Type (None/Crate/Chinook/Cargoship)": "Crate",

      "Tank Options - Move Speed (0-1)": 1.0,

      "Tank Options - Move Force": 2000.0,

      "Tank Options - Health": 2500.0,

      "Tank Options - View Range": 50.0,

      "Turret Options - Fire Rate": 0.06,

      "Turret Options - Burst Length": 15,

      "Turret Options - Aim Cone": 3.0,

      "Turret Options - Bullet Damage": 20.0,

      "Bradley Debris - Scale With Tank": true,

      "Bradley Debris - Health": 500.0,

      "Bradley Debris - Time To Cool Down": 60.0,

      "Loot - Crate Amount (If default loot preset)": 4,

      "Loot - Used Loot Preset (leave blank for default)": "",

      "Loot - Rewards For Damage Dealt": [

        {

          "Shortname": "supply.signal",

          "Amount": 10,

          "Skin": 0,

          "Display Name": ""

        }

      ],

      "Loot - Fire Lock Time (in seconds)": 60

    },

    "Normal": {

      "Tank Target - Max distance to target": 10.0,

      "Tank Target - Max clothing amount": 4.0,

      "Tank Target - Targeted items": [

        "rocket.launcher",

        "explosive.timed",

        "explosive.satchel"

      ],

      "Tank Options - Model Scale": 0.6,

      "Tank Options - Map Marker Type (None/Crate/Chinook/Cargoship)": "Crate",

      "Tank Options - Move Speed (0-1)": 1.0,

      "Tank Options - Move Force": 2000.0,

      "Tank Options - Health": 1000.0,

      "Tank Options - View Range": 50.0,

      "Turret Options - Fire Rate": 0.06,

      "Turret Options - Burst Length": 10,

      "Turret Options - Aim Cone": 3.0,

      "Turret Options - Bullet Damage": 15.0,

      "Bradley Debris - Scale With Tank": true,

      "Bradley Debris - Health": 500.0,

      "Bradley Debris - Time To Cool Down": 60.0,

      "Loot - Crate Amount (If default loot preset)": 4,

      "Loot - Used Loot Preset (leave blank for default)": "",

      "Loot - Rewards For Damage Dealt": [

        {

          "Shortname": "supply.signal",

          "Amount": 5,

          "Skin": 0,

          "Display Name": ""

        }

      ],

      "Loot - Fire Lock Time (in seconds)": 60

    }

  },

  "Loot - Presets": {

    "custom": {

      "Loot - Min. Crates": 2,

      "Loot - Max. Crates": 4,

      "Loot - Min. Items Per Crate": 4,

      "Loot - Max. Items Per Crate": 5,

      "Loot - Loot Table": [

        {

          "Shortname": "explosive.timed",

          "Amount": 10,

          "Skin": 0,

          "Display Name": "",

          "Chance": 100,

          "Additional Items": []

        },

        {

          "Shortname": "metal.refined",

          "Amount": 100,

          "Skin": 0,

          "Display Name": "",

          "Chance": 100,

          "Additional Items": []

        },

        {

          "Shortname": "lmg.m249",

          "Amount": 1,

          "Skin": 0,

          "Display Name": "",

          "Chance": 50,

          "Additional Items": [

            {

              "Shortname": "ammo.rifle",

              "Amount": 10,

              "Skin": 0,

              "Display Name": ""

            }

          ]

        }

      ]

    }

  }

}

ThePitereq

Posted (edited)

Try removing
 

    "default": [

      "CustomRoad1",

      "CustomRoad2"

    ],
from Tank Routes - Custom Purchasable Roads Per Map

Sorry for long reply. I though i sent message, but idk what happened.

Edited by ThePitereq
Ondraasek

Posted

np having this now:

"Tank Routes - Custom Purchasable Roads Per Map": {    

    "Detroit": [

      "DetroitRoad1",

      "DetroitRoad2",

      "DetroitRoad3"

    ],

    "HapisIsland": [

      "HapisRoad2",

      "HapisRoad3",

      "HapisRoad4"

    ]

  },

 

and still error:

09/16 16:43:39 | Failed to call hook 'RoadBradleyConsoleCommand' on plugin 'RoadBradley v1.3.1' (KeyNotFoundException: The given key was not present in the dictionary.)
at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <fb001e01371b4adca20013e0ac763896>:0
at Oxide.Plugins.RoadBradley.TryPurchaseTank (BasePlayer player, System.String profile) [0x000c2] in <f93f85b030f94e688d14cc35de811ff2>:0
at Oxide.Plugins.RoadBradley.RoadBradleyConsoleCommand (ConsoleSystem+Arg arg) [0x0011f] in <f93f85b030f94e688d14cc35de811ff2>:0
at Oxide.Plugins.RoadBradley.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00c77] in <f93f85b030f94e688d14cc35de811ff2>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <09575a60985045248bcb43b20faeeb99>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <bae5f1223fce49c493b01571c99dce02>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <bae5f1223fce49c493b01571c99dce02>:0

 

sorry for bothering you, thanks a lot for your help, its config generated by new version, I just changed the price + loot.

See config now attached. thanks a lot for advice

 

RoadBradley.json

ThePitereq

Posted

I think i found the problem. will be fixed today.

Ondraasek

Posted

After new version releasedd today with my config even new generated config, still the same.

'RoadBradley v1.3.2' (ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index)
at System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) [0x00029] in <fb001e01371b4adca20013e0ac763896>:0
at System.ThrowHelper.ThrowArgumentOutOfRangeException () [0x00000] in <fb001e01371b4adca20013e0ac763896>:0
at Oxide.Plugins.RoadBradley.TryPurchaseTank (BasePlayer player, System.String profile) [0x001ae] in <72257fda32734d7a83da207c67fcc355>:0
at Oxide.Plugins.RoadBradley.RoadBradleyConsoleCommand (ConsoleSystem+Arg arg) [0x0011f] in <72257fda32734d7a83da207c67fcc355>:0
at Oxide.Plugins.RoadBradley.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00c77] in <72257fda32734d7a83da207c67fcc355>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <09575a60985045248bcb43b20faeeb99>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <bae5f1223fce49c493b01571c99dce02>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <bae5f1223fce49c493b01571c99dce02>:0

Please advise thank you

Ondraasek

Posted

its spawning random bradleys, but /buytank UI is working but when you click on buy, so its doing nothing and giving this console error

  • Like 1
ThePitereq

Posted

Now sure how this error appears. Tested on my server with default config and one you sent me previously and everything works fine.
Please contact me on discord ThePitereq#3979 we will try to find the problem with some debugging if you want ofc.
You can also find me on discord linked on top of plugin's description.

Ondraasek

Posted

I pmed you on DC, thanks a lot

Ondraasek

Posted

Solved on discord, thank you so much, very responsive and helpful developer, everything is great now ❤️

  • Like 1
ThePitereq

Posted

Changed Status from Pending to Closed

Changed Fixed In to Next Version

1.4m

Downloads

Total number of downloads.

6.9k

Customers

Total customers served.

102.1k

Files Sold

Total number of files sold.

2m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.