2022-01-31 22:29:54: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'rangedweapons' in callback item_OnSecondaryUse(): /mods/rangedweapons-1/init.lua:66: attempt to index local 'gun_data' (a nil value)
2022-01-31 22:29:54: ERROR[Main]: stack traceback:
2022-01-31 22:29:54: ERROR[Main]: /mods/rangedweapons-1/init.lua:66: in function 'rangedweapons_reload_gun'
2022-01-31 22:29:54: ERROR[Main]: /mods/rangedweapons-1/weapons/auto_rifle/ak47.lua:69: in function </mods/rangedweapons-1/weapons/auto_rifle/ak47.lua:68>
2022-01-31 22:29:54: ACTION[Main]: Server: Shutting down
Steps:
Start a new fresh (singleplayer) world (will the latest changes applied to my master branch), only adding rangedweapons-1 as mod to use
Give yourself an AK-47, and some ammo for that gun (7.66 mm If I remember it right)
Attempt the deadly right click / reload. (Should crash right there, if not then what's the difference)
Ugh, I first need to load the gun to debug the issue with refactoring breaking.
:boom:
Steps:
right click
/reload
. (Should crash right there, if not then what's the difference)