|
发表于 2024-4-25 16:31:15
|
显示全部楼层
-- 获取范围内的整数
function validateIntRange(data, min, max)
local num = tonumber(data)
if num and num == math.floor(num) and num >= min and num <= max then
return num
else
return nil
end
end
[6] = function(play, data) --行会印记
local inx = validateIntRange(data[1], 1, 7)
if inx == nil then
sendmsg(play, 1, '{"Msg":"数据验证失败...","Type":9}')
return
end
|
|