diff --git a/modules/ExpGamingCommands/home/control.lua b/modules/ExpGamingCommands/home/control.lua index 53b9481b..5edc3fbb 100644 --- a/modules/ExpGamingCommands/home/control.lua +++ b/modules/ExpGamingCommands/home/control.lua @@ -20,8 +20,8 @@ commands.add_command('home', 'Allows you to set, remove and goto your homes', { if command == 'set' then local pos = {math.floor(player.position.x),math.floor(player.position.y)} if homes._n+1 > homes._m then player_return{'ExpGamingCommands-home.too-many-homes',homes._m} return commands.error end + if not homes[name] then homes._n=homes._n+1 end homes[name] = pos - homes._n=homes._n+1 player_return{'ExpGamingCommands-home.set',name,pos[1],pos[2]} elseif command == 'remove' then if not homes[name] then player_return{'ExpGamingCommands-home.invalid',name} return commands.error end