Jump to content

Road Bradley Fail to Call Hook

Closed 1.5.2 1.5.3

TeamDolny
TeamDolny

Posted

When I try to edit the RoadBradley.json config file so that the default route will spawn the Bradley with 0 or 1 players online, I get the following error in console:

Failed to call hook 'OnServerInitialized' on plugin 'RoadBradley v1.5.2' (IndexOutOfRangeException: Index was outside the bounds of the array.) at (wrapper stelemref) System.Object.virt_stelemref_class_small_idepth(intptr,object) at Oxide.Plugins.RoadBradley.SpawnTank (System.String profileName, System.String routeName) [0x001e3] in <3256d1e6b8544bb9af8837ed53b9c38c>:0 at Oxide.Plugins.RoadBradley.SpawnDefaultRouteTank (System.String route) [0x001f9] in <3256d1e6b8544bb9af8837ed53b9c38c>:0 at Oxide.Plugins.RoadBradley.OnServerInitialized () [0x005f9] in <3256d1e6b8544bb9af8837ed53b9c38c>:0 at Oxide.Plugins.RoadBradley.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0008d] in <3256d1e6b8544bb9af8837ed53b9c38c>:0 at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <23ba99f131254889867c71f0bd137b1d>:0 at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <157a94ee66ab4a7991faecd1eb84be3b>:0 at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <157a94ee66ab4a7991faecd1eb84be3b>:0

Loaded plugin RoadBradley v1.5.2 by ThePitereq

We are a small private server that only has 1 or 2 players at a time and would like the Bradley to spawn automatically to roam the main long ring road.  The version before this one was working perfectly for us.  I tried to use the settings from the old config file, but that was not working.

Thank you for your help.

TeamDolny

Posted

I thought I should show you the portion of the config file that I am referring to.  When  I change the line for the number of players who need to be online for 1 tank to spawn, anything less than 2 gives that call hook failure.

  "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": 0,
      "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": 2,
        "2": 8
      },
      "Spawns - Chance": {
        "Hard": 2,
        "Normal": 5
      }
    },

ThePitereq

Posted

Hmmm weird, can you send me whole config? Here or in DMs.

TeamDolny

Posted

Attached is the config file.  Right now it is set in the default section to have 1 tank when 2 players are online, and for the tank to be on the longest road.  It does not spawn automatically at all, even when the 2 of us are online.

Thanks for looking into this!  We miss the Road Bradley!

RoadBradley.json

Zzyzxx71

Posted

I'm getting a similar error.

Failed to call hook 'OnServerInitialized' on plugin 'RoadBradley v1.5.2' (IndexOutOfRangeException: Index was outside the bounds of the array.)
  at (wrapper stelemref) System.Object.virt_stelemref_class_small_idepth(intptr,object)
  at Oxide.Plugins.RoadBradley.SpawnTank (System.String profileName, System.String routeName) [0x001e3] in <2673bfe0820045be9de90161d39bcff6>:0
  at Oxide.Plugins.RoadBradley.SpawnDefaultRouteTank (System.String route) [0x001f9] in <2673bfe0820045be9de90161d39bcff6>:0  
  at Oxide.Plugins.RoadBradley.OnServerInitialized () [0x005f9] in <2673bfe0820045be9de90161d39bcff6>:0
  at Oxide.Plugins.RoadBradley.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0008d] in <2673bfe0820045be9de90161d39bcff6>:0
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <23ba99f131254889867c71f0bd137b1d>:0
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <157a94ee66ab4a7991faecd1eb84be3b>:0

I've attached my config as well

 

RoadBradley.json

ThePitereq

Posted

Should be fixed in 1.5.3.

Sorry for long waiting.

ThePitereq

Posted

Changed Status from Pending to Closed

Changed Fixed In to 1.5.3

1.4m

Downloads

Total number of downloads.

6.8k

Customers

Total customers served.

101.4k

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.