Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed Fall Damage [ Error : [ script:qbx_medical] SCRIPT ERROR: @qbx_…
…medical/client/damage/damage.lua:211: attempt to index a nil value (field '?') [ script:qbx_medical] > checkForDamage (@qbx_medical/client/damage/damage.lua:211) [ script:qbx_medical] > fn (@qbx_medical/client/damage/damage.lua:225) Error Explanation: The error "attempt to index a nil value" is occurring in the damage system where it tries to access a field of WEAPONS[weaponHash]. 1 > I added null check for WEAPONS table 2 > Then added proper initialization of WEAPONS 3 > Then added safety checks when accessing weapon data 4 > Ensure core object is loaded before accessing weapons Now : 1 > It Handles fall damage gracefully 2 > Won't throw shitty error even if weapon data isn't loaded yet 3 > Provides feedback even for unknown damage types 🙌
- Loading branch information