Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Commit

Permalink
fix error.
Browse files Browse the repository at this point in the history
  • Loading branch information
Redbeanw44602 committed Jan 22, 2022
1 parent 2beeb87 commit c74ece8
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions iland-core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
--]] ------------------------------------------------------

Plugin = {
version = "2.61",
numver = 261,
version = "2.62",
numver = 262,
apiver = 200,
minLXL = {0,5,12},
}
Expand Down Expand Up @@ -502,6 +502,11 @@ ConfigReader = {
this.land.bought.three_dimension.calculate = "{square}*8+{height}*20"
this.land.bought.two_dimension.calculate = "{square}*25"
end
if this.version < 262 then
if type(this.land.bought.square_range)~='table' then
this.land.bought.square_range = {4,50000}
end
end
--- Rtn
return true
end,
Expand Down Expand Up @@ -3030,7 +3035,7 @@ function RegisterCommands()
end)
mc.regPlayerCmd(MainCmd..' buy',_Tr('command.land_buy'),function (player,args)
local xuid = player.xuid
if MEM[xuid].newLand==nil then
if MEM[xuid].newLand==nil or MEM[xuid].newLand.range==nil then
SendText(player,_Tr('talk.invalidaction'))
return
end
Expand Down Expand Up @@ -3107,7 +3112,7 @@ function RegisterCommands()
end)
mc.regPlayerCmd(MainCmd..' ok',_Tr('command.land_ok'),function (player,args)
local xuid = player.xuid
if MEM[xuid].reselectLand == nil then
if MEM[xuid].reselectLand==nil or MEM[xuid].reselectLand.range==nil then
SendText(player,_Tr('talk.invalidaction'))
return
end
Expand Down Expand Up @@ -4158,7 +4163,7 @@ mc.listen('onServerStarted',function()
catch
{
function (err)
log(err)
WARN(err)
ERROR('Something wrong when load data, plugin closed.')
Plugin.Unload()
end
Expand Down

0 comments on commit c74ece8

Please sign in to comment.