From 861d2810be065653cca3a8d98755a86ab37adba5 Mon Sep 17 00:00:00 2001 From: ademant Date: Thu, 21 Feb 2019 14:33:50 +0100 Subject: [PATCH] error in substraction function --- api.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/api.lua b/api.lua index 766867c..5a51709 100644 --- a/api.lua +++ b/api.lua @@ -60,6 +60,7 @@ xpfw.player_add_attribute=function(player,attrib,val) -- if = 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