Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash regarding nil value for job_heat #955

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Wh1t3st4r
Copy link

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

  • 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:

  • My changes generate no new warnings

Fix implemented and orientated by 'Shaklin' to counter a crash with custom maps
@cucumber-dragon
Copy link

cucumber-dragon commented Feb 8, 2023

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!

@Wh1t3st4r
Copy link
Author

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.

@king8-savage
Copy link

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

@Wh1t3st4r
Copy link
Author

Wh1t3st4r commented Apr 5, 2023 via email

@king8-savage
Copy link

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

@Wh1t3st4r
Copy link
Author

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!

@Shadeloid
Copy link

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

@Wh1t3st4r
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants