WolfHUD icon indicating copy to clipboard operation
WolfHUD copied to clipboard

Fix crash regarding nil value for job_heat

Open Wh1t3st4r opened this issue 1 year ago • 8 comments

Fix implemented and orientated by "Shaklin" in the "Show Contract XP" mod imported to counter a crash with custom maps.

Description

The only actual change is before directly getting the 'heat to experience' value, a check is done to verify if the 'job heat' value is nil or not; if it is nil, it's value is substituted to "0" to fix this crash that happens in: "[string "lib/managers/jobmanager.lua"]:502: attempt to compare nil with number". This fix fixes any problems with custom heists of any sorts and any kind of heist XP calculation.

Fixes # #952

Type of change

  • [X] Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Game is running in the newest version with two custom maps (Enemy Spawner & Greenscreen) localized in "Custom Heists" and "Events" tab

Before Fix

  • Turn on game and select "Play Online/Offline"
  • Select "Contract_Broker"
  • Click on "Custom Heists" or "Events"
  • Crash

After Fix

  • Turn on game and select "Play Online/Offline"
  • Select "Contract_Broker"
  • Click on "Custom Heists" and "Events"
  • Nothing bad

Checklist:

  • [X] My changes generate no new warnings

Wh1t3st4r avatar Feb 05 '23 04:02 Wh1t3st4r

I have tested it and it works! Before updating the file I couldn't use the mod on any custom heists. In fact, whenever I have a custom heist installed, the game crashes when I click on the contract broker button. After the fix however, I can use wolfhud without any issues!

cucumber-dragon avatar Feb 08 '23 16:02 cucumber-dragon

I have tested it and it works! Before updating the file I couldn't use the mod on any custom heists. In fact, whenever I have a custom heist installed, the game crashes when I click on the contract broker button. After the fix however, I can use wolfhud without any issues!

Perfecto mate! It'll probably not be implemented in a good while for the main mod, but as long as that is the case the fork will be here to help on that, I really hope @Kamikaze94 gets back on github to at least pull merge some fixes.

Wh1t3st4r avatar Feb 08 '23 21:02 Wh1t3st4r

hello i'm having the same issue has this been fixed if not how can i implement it to my mod?

king8-savage avatar Apr 05 '23 03:04 king8-savage

It has not Yet been merged, but you can head to my branch and download the mod from there, it'll be the same as installing the mod you already have.

On Wed, Apr 5, 2023, 12:21 AM king8-savage @.***> wrote:

hello i'm having the same issue has this been fixed if not how can i implement it to my mod?

— Reply to this email directly, view it on GitHub https://github.com/Kamikaze94/WolfHUD/pull/955#issuecomment-1496868580, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQVTXNGMRGUYUZJUOWBAQQDW7TQL3ANCNFSM6AAAAAAURRXVQ4 . You are receiving this because you authored the thread.Message ID: @.***>

Wh1t3st4r avatar Apr 05 '23 09:04 Wh1t3st4r

hey man thank you it fixed my issue aswell only ""issue"" is that the download manager always thinks it's not updated to the latest version

king8-savage avatar Apr 05 '23 17:04 king8-savage

hey man thank you it fixed my issue aswell only ""issue"" is that the download manager always thinks it's not updated to the latest version

Glad it helped mate! Yeah I need to work on that if it will become standalone, I was hoping @Kamikaze94 would return and implement the fix but in case other problems can get fixed I could probably insert the same update feature to that branch. In any case try to ignore it for the time being, try not to update it as it would reverse the changes back to the original!

Wh1t3st4r avatar Apr 05 '23 21:04 Wh1t3st4r

Which file do i have to edit? job_heat? Where's that? Appdata?

Shadeloid avatar Apr 10 '23 17:04 Shadeloid

Which file do i have to edit? job_heat? Where's that? Appdata?

Hop into my branch download and install it the same way you would with the original one, It'll come with the fix without any tinkering necessary.

Wh1t3st4r avatar Apr 10 '23 17:04 Wh1t3st4r