def param_plus() error

I'm lost. I have no clue why I'm getting an error with this:

#-------------------------------------------------------------------------- # * Get Added Value of Parameter #-------------------------------------------------------------------------- def param_plus(param_id) equips.compact.inject(super) {|r, item| r += item.params[param_id] } # Error on this line endThe error message reads:

Script 'Game_Actor' line 401: NoMethodError occurred.

undefined method '+' for nil:NilClass
Can anyone help? I didn't even change anything related to that function or the function itself. :/

The error occurs when I use a skill that has a state. I did a msgbox check of it and it looks like r is nil at some point. I don't know how it got to be nil, but maybe someone could clarify?
I found the problem, little confused what this function is for then, but I denoted what stat you guys know of by default is luck with an 8 instead of a 7.

Original thread: https://forums.rpgmakerweb.com/threads/def-param_plus-error.51320/