Jump to content

Spam console error

Closed 1.1.9 1.2.0

tannermon11
tannermon11

Posted

Whenever someone gets targeted by the bradley and then goes outside of the bradleys viewing range it spams this message in console.

KeyNotFoundException: The given key was not present in the dictionary.

ThePitereq

Posted

On 6/22/2022 at 5:33 AM, tannermon11 said:

Whenever someone gets targeted by the bradley and then goes outside of the bradleys viewing range it spams this message in console.

KeyNotFoundException: The given key was not present in the dictionary.

Hey! I need more detaIls about this error. Please give me log from direct output from console. You can get it by adding -logfile to your start bash file (if you are using Linux) or search in Google for Windows version. 
It should print this error with additional lines of code.
But this error is little bit weird. Do you use any different bradley plugins?

tannermon11

Posted

I have BradleyGuards. I have it being hosted through someone I do see in the logs it runs the start commands (but without the -logfile) but don't see it anywhere in the settings to change it (the start command flags). 

ThePitereq

Posted

10 hours ago, tannermon11 said:

I have BradleyGuards. I have it being hosted through someone I do see in the logs it runs the start commands (but without the -logfile) but don't see it anywhere in the settings to change it (the start command flags). 

If it is an hosting in msot cases there is latest.log file in main directory, if not contact support how to enable that. Without full error there is many possibilities of this problem.

tannermon11

Posted (edited)

Think I found it

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+TankBrakes.Brakes (System.Boolean enable) [0x000a0] in <ff5ace8437344e8299b409337740fc6a>:0 
  at Oxide.Plugins.RoadBradley+TankBrakes.CheckTargets () [0x00130] in <ff5ace8437344e8299b409337740fc6a>:0 
  at InvokeHandlerBase`1[T].DoTick () [0x000be] in <e42c6154aed94d3d8c024f71baeffbed>:0 
  at InvokeHandlerBase`1[T].LateUpdate () [0x0000c] in <e42c6154aed94d3d8c024f71baeffbed>:0 
 
(Filename: <fb001e01371b4adca20013e0ac763896> Line: 0)

 

 

Edited by tannermon11
ThePitereq

Posted

On 6/25/2022 at 1:40 AM, tannermon11 said:

Think I found it

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+TankBrakes.Brakes (System.Boolean enable) [0x000a0] in <ff5ace8437344e8299b409337740fc6a>:0 
  at Oxide.Plugins.RoadBradley+TankBrakes.CheckTargets () [0x00130] in <ff5ace8437344e8299b409337740fc6a>:0 
  at InvokeHandlerBase`1[T].DoTick () [0x000be] in <e42c6154aed94d3d8c024f71baeffbed>:0 
  at InvokeHandlerBase`1[T].LateUpdate () [0x0000c] in <e42c6154aed94d3d8c024f71baeffbed>:0 
 
(Filename: <fb001e01371b4adca20013e0ac763896> Line: 0)

 

 

You sure that you use unedited, latest version of the plugin? There is no line with dictionary mentioned in function where you have this error.

tannermon11

Posted

Did a file compare between the one I downloaded and the one I have running and it said they are identical

ThePitereq

Posted (edited)

19 minutes ago, tannermon11 said:

Did a file compare between the one I downloaded and the one I have running and it said they are identical

That's weird. One of your plugins must be in conflict or collide with mine somehow. Noone reported problem like that, and i think i would get a lot of reports about that.
Try removing your plugins and check if the problem still appears.
Its weird that you get the dictionary error even if there is no dictionary in code.

Edited by ThePitereq
tannermon11

Posted

With a little bit of testing I figured out it's an issue with your if statement. I first got rid of apc.IsVisibleAndCanSee(target.eyes.position) on line 1383 but issue was there still. I then commented out 1383 to 1386 and the issue no longer appears which leads me to conclude it's the line below that is causing the issue when out of range
Vector3.Distance(apc.transform.position, target.eyes.position) < apc.viewDistance

ThePitereq

Posted

Just now, tannermon11 said:

With a little bit of testing I figured out it's an issue with your if statement. I first got rid of apc.IsVisibleAndCanSee(target.eyes.position) on line 1383 but issue was there still. I then commented out 1383 to 1386 and the issue no longer appears which leads me to conclude it's the line below that is causing the issue when out of range
Vector3.Distance(apc.transform.position, target.eyes.position) < apc.viewDistance

The issue is not there. I see that there must be something wrong with your path config. This is the only way why it prints errors. Send me your config please.

ThePitereq

Posted

2 minutes ago, tannermon11 said:

I see that you've increased view range. Can you decreate it and check if problem still appears? (It shouldn't change anything but just in case)

The problem appears on my plugin bradley's or from different plugins?

tannermon11

Posted (edited)

Nevermind it's actually not an issue with the if statement it's an issue with the brakes. I replaced Brakes(true) after the if statement with a Debug.Log and not it isn't spamming the error message and it also unbrakes properly now(before it would stay in the brake position after targetting someone forever)

 

I'll check with less viewing range

 

Checked with default 50 range issue still occurs

Edited by tannermon11
viewing range edit
ThePitereq

Posted

1 minute ago, tannermon11 said:

Nevermind it's actually not an issue with the if statement it's an issue with the brakes. I replaced Brakes(true) after the if statement with a Debug.Log and not it isn't spamming the error message and it also unbrakes properly now(before it would stay in the brake position after targetting someone forever)

Because the problem is with missing _plugin.tankRoads[path] or _plugin.purchasedRoads[purchasedPath]) and not sure how it is possible

tannermon11

Posted

13 minutes ago, ThePitereq said:

I see that you've increased view range. Can you decreate it and check if problem still appears? (It shouldn't change anything but just in case)

The problem appears on my plugin bradley's or from different plugins?

I tried unloading BradleyGuards (the only other plugin I have associated with Bradley) and the issue is still occurring.

ThePitereq

Posted

Try the newest version. The problem should be solved there.

  • Like 1
ThePitereq

Posted

Changed Status from Pending to Closed

Changed Fixed In to 1.2.0

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.