error in substraction function
parent
72cbbbadf9
commit
861d2810be
1
api.lua
1
api.lua
|
@ -60,6 +60,7 @@ xpfw.player_add_attribute=function(player,attrib,val)
|
||||||
-- if <val> = nil then set to max value
|
-- if <val> = nil then set to max value
|
||||||
local nval=val
|
local nval=val
|
||||||
local att_def=xpfw.attributes[attrib]
|
local att_def=xpfw.attributes[attrib]
|
||||||
|
if att_def == nil then return end
|
||||||
if val==nil then
|
if val==nil then
|
||||||
nval=att_def.max or 20
|
nval=att_def.max or 20
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue