Update api.lua

This commit is contained in:
Panquesito7 2019-06-17 13:03:27 -05:00 committed by GitHub
parent e248752ee4
commit 4adc602704
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -465,8 +465,8 @@ end
armor.load_armor_inventory = function(self, player)
local _, inv = self:get_valid_player(player, "[load_armor_inventory]")
local meta = player:get_meta()
if inv then
local meta = player:get_meta()
local armor_list_string = meta:get_string("3d_armor_inventory")
if armor_list_string then
inv:set_list("armor",
@ -478,8 +478,8 @@ end
armor.save_armor_inventory = function(self, player)
local _, inv = self:get_valid_player(player, "[save_armor_inventory]")
local meta = player:get_meta()
if inv then
local meta = player:get_meta()
meta:set_string("3d_armor_inventory",
self:serialize_inventory_list(inv:get_list("armor")))
end