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

Commit c74ece8

Browse files
committed
fix error.
1 parent 2beeb87 commit c74ece8

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

iland-core.lua

+10-5
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
--]] ------------------------------------------------------
1414

1515
Plugin = {
16-
version = "2.61",
17-
numver = 261,
16+
version = "2.62",
17+
numver = 262,
1818
apiver = 200,
1919
minLXL = {0,5,12},
2020
}
@@ -502,6 +502,11 @@ ConfigReader = {
502502
this.land.bought.three_dimension.calculate = "{square}*8+{height}*20"
503503
this.land.bought.two_dimension.calculate = "{square}*25"
504504
end
505+
if this.version < 262 then
506+
if type(this.land.bought.square_range)~='table' then
507+
this.land.bought.square_range = {4,50000}
508+
end
509+
end
505510
--- Rtn
506511
return true
507512
end,
@@ -3030,7 +3035,7 @@ function RegisterCommands()
30303035
end)
30313036
mc.regPlayerCmd(MainCmd..' buy',_Tr('command.land_buy'),function (player,args)
30323037
local xuid = player.xuid
3033-
if MEM[xuid].newLand==nil then
3038+
if MEM[xuid].newLand==nil or MEM[xuid].newLand.range==nil then
30343039
SendText(player,_Tr('talk.invalidaction'))
30353040
return
30363041
end
@@ -3107,7 +3112,7 @@ function RegisterCommands()
31073112
end)
31083113
mc.regPlayerCmd(MainCmd..' ok',_Tr('command.land_ok'),function (player,args)
31093114
local xuid = player.xuid
3110-
if MEM[xuid].reselectLand == nil then
3115+
if MEM[xuid].reselectLand==nil or MEM[xuid].reselectLand.range==nil then
31113116
SendText(player,_Tr('talk.invalidaction'))
31123117
return
31133118
end
@@ -4158,7 +4163,7 @@ mc.listen('onServerStarted',function()
41584163
catch
41594164
{
41604165
function (err)
4161-
log(err)
4166+
WARN(err)
41624167
ERROR('Something wrong when load data, plugin closed.')
41634168
Plugin.Unload()
41644169
end

0 commit comments

Comments
 (0)