morerokk / IreNFist

A continuation/fix of the IreNFist mod for PAYDAY 2
MIT License
4 stars 2 forks source link

Crash upon zooming in with a weapon gadget #30

Closed Bwamo closed 4 years ago

Bwamo commented 4 years ago
[string "lib/units/weapons/newraycastweaponbase.lua"]:679: attempt to perform arithmetic on field 'gadget_zoom_add' (a nil value)

SCRIPT STACK

get_zoom_fov() @mods/IRE AND FIST REBORN/lua/playerstandard.lua:2072
original() @mods/IRE AND FIST REBORN/lua/playerstandard.lua:207
_stance_entered() @mods/base/req/core/Hooks.lua:265
_start_action_steelsight() @mods/IRE AND FIST REBORN/lua/playerstandard.lua:980
_check_state() lib/units/weapons/weaponsecondsight.lua:25
original() lib/units/weapons/weapongadgetbase.lua:23
set_state() @mods/base/req/core/Hooks.lua:265
set_gadget_on() lib/units/weapons/newraycastweaponbase.lua:1276
toggle_gadget() lib/units/weapons/newraycastweaponbase.lua:1387
_toggle_gadget() lib/units/beings/player/states/playerstandard.lua:2492
_check_action_weapon_gadget() lib/units/beings/player/states/playerstandard.lua:2512
_update_check_actions() lib/units/beings/player/states/playerstandard.lua:928
original() lib/units/beings/player/states/playerstandard.lua:435
original() @mods/base/req/core/Hooks.lua:188
update_original() @mods/base/req/core/Hooks.lua:265
update() @mods/IRE AND FIST REBORN/lua/BurstFire.lua:350
original() lib/units/beings/player/playermovement.lua:271
@mods/base/req/core/Hooks.lua:265
morerokk commented 4 years ago

Great

morerokk commented 4 years ago

Why though?

I'll take a look at this right away.

morerokk commented 4 years ago

What the fuck? It's happening to me too now. I literally just used a gadget like this yesterday and it was fine.

This is going to be an absolute fucking pain to debug. Thanks for the report.

morerokk commented 4 years ago

It looks like one of the magnifiers works and the other one just causes a crash. I have zero clue why. For now, use the other one if you have it. This probably won't take longer than an hour to fix.

morerokk commented 4 years ago

Fixed. The issue was caused by me accidentally overwriting the magnifier gadget's stats with a table that didn't have zoom on it (which was quite a while ago).