error in substraction function

master
ademant 2019-02-21 14:33:50 +01:00
parent 72cbbbadf9
commit 861d2810be
1 changed files with 1 additions and 0 deletions

View File

@ -60,6 +60,7 @@ xpfw.player_add_attribute=function(player,attrib,val)
-- if <val> = nil then set to max value
local nval=val
local att_def=xpfw.attributes[attrib]
if att_def == nil then return end
if val==nil then
nval=att_def.max or 20
end