NullReferenceException at TryDropCrateFixed

Failed to run a 105.00 timer in 'ChinookDropRandomizer v1.3.0' (NullReferenceException: )

at (wrapper managed-to-native) UnityEngine.Component.get_transform(UnityEngine.Component)

at Oxide.Plugins.ChinookDropRandomizer+<TryDropCrate>c__AnonStorey0.<>m__0 () [0x00050] in <9b41eb3ed3704f0da70a00d46c1350b7>:0

at Oxide.Core.Libraries.Timer+TimerInstance.FireCallback () [0x00018] in <4452f821def6406d834e4149849fe7ea>:0

Could I see your config file? And does this happen every single time a chinook is out?
In response to shinnova ():
Could I see your config file? And does this happen every single time a chinook is out?

(18:45:19) | [event] assets/prefabs/npc/ch47/ch47scientists.entity.prefab

(18:45:19) | Setting parent to entity that hasn't spawned yet! (net is null)

(18:45:19) | NullReferenceException: Object reference not set to an instance of an object

(18:47:04) | Failed to run a 105.00 timer in 'ChinookDropRandomizer v1.3.0' (NullReferenceException: )

at (wrapper managed-to-native) UnityEngine.Component.get_transform(UnityEngine.Component)

at Oxide.Plugins.ChinookDropRandomizer+<TryDropCrate>c__AnonStorey0.<>m__0 () [0x00050] in <9b41eb3ed3704f0da70a00d46c1350b7>:0

at Oxide.Core.Libraries.Timer+TimerInstance.FireCallback () [0x00018] in <4452f821def6406d834e4149849fe7ea>:0

I think this is related to Timed-Events, not your plugin issue.
I used Time-Events to block the system spawn of ch47, so get this error.

(08:09:12) | Failed to run a 572.00 timer in 'ChinookDropRandomizer v1.3.0' (NullReferenceException: )

at (wrapper managed-to-native) UnityEngine.Component.get_transform(UnityEngine.Component)

at Oxide.Plugins.ChinookDropRandomizer+<TryDropCrate>c__AnonStorey0.<>m__0 () [0x00050] in <6f7ad19eb6a9477caa15c2dc1b57b7f0>:0

at Oxide.Core.Libraries.Timer+TimerInstance.FireCallback () [0x00018] in <4452f821def6406d834e4149849fe7ea>:0

{
  "Prevent the game from handling chinook drops": false,
  "Minimum time until drop (in seconds)": 300,
  "Maximum time until drop (in seconds)": 600,
  "Don't drop above water": true,
  "Don't drop above monuments": false,
  "What monuments to check (only works if monument checking is enabled)": {
    "AbandonedCabins": true,
    "Airfield": true,
    "BanditCamp": true,
    "Compound": true,
    "Compound1": true,
    "Compound2": true,
    "Dome": true,
    "GasStation": true,
    "GasStation1": true,
    "Harbor1": true,
    "Harbor2": true,
    "Junkyard": true,
    "Launchsite": true,
    "Lighthouse": true,
    "Lighthouse1": true,
    "Lighthouse2": true,
    "MilitaryTunnel": true,
    "MiningOutpost": true,
    "MiningOutpost1": true,
    "MiningOutpost2": true,
    "PowerPlant": true,
    "QuarryHQM": true,
    "QuarryStone": true,
    "QuarrySulfur": true,
    "Satellite": true,
    "SewerBranch": true,
    "SuperMarket": true,
    "SuperMarket1": true,
    "Trainyard": true,
    "WaterTreatment": true
  }
}


Merged post

@shinnova
Good afternoon.

As for the error, it happened here as well. 

 

(17:41:50) | Failed to run a 242.00 timer in 'ChinookDropRandomizer v1.3.0' (NullReferenceException: )
  at (wrapper managed-to-native) UnityEngine.Component.get_transform(UnityEngine.Component)
  at Oxide.Plugins.ChinookDropRandomizer+<TryDropCrate>c__AnonStorey0.<>m__0 () [0x00050] in <8506fc8824634ddea2f9419b8da9e894>:0 
  at Oxide.Core.Libraries.Timer+TimerInstance.FireCallback () [0x00018] in <4452f821def6406d834e4149849fe7ea>:0​


What happens is that the chinook thinks its getting attacked when he wants to drop the crate. One of my players was also taken down by the chinook on the moment he wanted to drop. He had no intentions to trigger the chinook with bullets or anything. My discord logs went mad when this happened. ( just picked 2, otherwise, we would have a leap of unneeded text ) 

17:41  --- CH47 is under attack - HELI : ch47scientists.entity[9372337]
17:41  --- CH47 is under attack - HELI : ch47scientists.entity[9372337]


As you say that the monuments are hardcoded, could you just not define the locations with the help of the generated patrol path that's in the game? just thinking here with ya ofc, don't know if it would be possible or not. 

How odd. I'll have to look into what is causing the chinook to believe it's under attack.

As for using the generated patrol path, that could be worth looking into using. I had not thought of this myself, so thank you for the suggestion ^^
Chinook spawned, just flies off map. No drop.


{
"Prevent the game from handling chinook drops": true,
"Minimum time until drop (in seconds)": 60,
"Maximum time until drop (in seconds)": 600,
"Don't drop above water": true,
"Don't drop above monuments": false,
"What monuments to check (only works if monument checking is enabled)": {
"AbandonedCabins": true,
"Airfield": true,
"BanditCamp": true,
"Compound": true,
"Compound1": true,
"Compound2": true,
"Dome": true,
"GasStation": true,
"GasStation1": true,
"Harbor1": true,
"Harbor2": true,
"Junkyard": true,
"Launchsite": true,
"Lighthouse": true,
"Lighthouse1": true,
"Lighthouse2": true,
"MilitaryTunnel": true,
"MiningOutpost": true,
"MiningOutpost1": true,
"MiningOutpost2": true,
"PowerPlant": true,
"QuarryHQM": true,
"QuarryStone": true,
"QuarrySulfur": true,
"Satellite": true,
"SewerBranch": true,
"SuperMarket": true,
"SuperMarket1": true,
"Trainyard": true,
"WaterTreatment": true
}
}
Also getting this error...

Failed to run a 514.00 timer in 'ChinookDropRandomizer v1.3.0' (NullReferenceException: )
  at (wrapper managed-to-native) UnityEngine.Component.get_transform(UnityEngine.Component)
  at Oxide.Plugins.ChinookDropRandomizer+<TryDropCrate>c__AnonStorey0.<>m__0 () [0x00050] in <198a1af79db849a8a02bea45447e6055>:0 
  at Oxide.Core.Libraries.Timer+TimerInstance.FireCallback () [0x00018] in <4452f821def6406d834e4149849fe7ea>:0​
heya @Philoludos , This happened also on our server. Question, did someone attacked the chinook or did someone died by the chinook? i think that when its triggered for some reason, that it doenst drop the crate. 

A player of mine was attacked and killed, he had no intention to interact with it as he was farming. Just wondering tho, it could help the plugin dev to find the solution. 

cheers, happy week ahead! 
 I've been the only one on. I've watched it fly in (directly for the Largo OilRig every time) from multiple directions, traverse the map, and never drop anything. I've since stopped using this addon and noticed that the behavior is roughly the same with and without the addon -- there's a small chance that it drops, but it does occasionally drop. The difference between vanilla and addon is that when it does decide to drop, vanilla puts it at a monument and the addon drops it anywhere (mostly in the damn water next to the rigs). 
''The difference between vanilla and addon is that when it does decide to drop, vanilla puts it at a monument and the addon drops it anywhere (mostly in the damn water next to the rigs). ''

Well, the thing is that without the chinookDropRandomizer, is that they won't be any hackable crates on the map. ( both servers of mine had no crates for a whole month last month. Since I started to use this again, it works and the error pops up really rarely. The bad side is that it might drop the crate in the water. Puzzle a little with the amount of time when the crate needs to be dropped on the map. 

mine settings are as following 

"Prevent the game from handling chinook drops": false,
"Minimum time until drop (in seconds)": 350,
"Maximum time until drop (in seconds)": 450,
"Don't drop above water": true,
"Don't drop above monuments": false,​


Sometimes, it does drop a crate. The changes it happened without the plugin are once a day with luck. With the chinook plugin, it drops more often, but not near monuments or anything but in a wild way on the map. ( see my server for an example, kirikru is the name. ) 

I also use the plugin ''timed events'' by @Orange to spawn the chinook more often then usually to compensate the take away of the chinook event by face punch. Really don't know why they changed it. Never remove something from a released game if it always worked perfectly. ( a fun fact, i assume they did it so people could not get the good stuff fast. but they could also just delay the first hours or days without a drop? )

Also, in my opinion, the oilrig event is good, its funny. but they could have done it differently. ( for example, a larger hackable crate as you need more than one player for those oil rigs. ) 

note: it doenst work if you use this plugin with timed events for example and spawning more then one chinook in the settings. Duplicated chinooks get automatically destroyed for some reason. ( not sure if this related to this or other plugins. ) This causes crates falling in the water once spawned in. 



 "4. CH47 settings:": {
    "1. Disable default spawns": false,
    "2. Minimal respawn time (in seconds)": 5600,
    "3. Maximal respawn time (in seconds)": 6200,
    "4. Minimal amount that spawned by once": 1,
    "5. Maximal amount that spawned by once": 1,
    "6. Minimal players to start event": 1​


 '' I've been the only one on. I've watched it fly in (directly for the Largo OilRig every time) from multiple directions, ''

Yes, it does indeed. Then, it goes away as nothing happened. The bad part indeed is that the monuments are hardcoded as @shinnova is explaining on the plugin page. I also think that the size of the map is playing a big role with some plugins.  



Because 
"1. Disable default spawns": false,​
so, @Orange, you suggest to turn it into ''true'' and let it fully handle on your plugin side? Doenst disabling the chinook event also messes with the oil rigs as well for other plugins that are depending on that spawning? please correct me if I'm wrong.  
In response to ():
so, @Orange, you suggest to turn it into ''true'' and let it fully handle on your plugin side? Doens...
I am recommending to set it to false to avoid any problems with oil rig, etc
Locked automatically