字符串的使用
在使用lua string.find的时候,在找小括号等一些特殊字符的时候,要在前边加上%,比如string.find(祝福(攻击),'祝福%(攻击%)')
Table
使用table做一些区间筛选
local a
table = {{1,5},{6,9}}
for i =1 ,#table do
if (a >= table[i][1] and a <= table[i][2]) then
return false
end
end
字符串的使用
在使用lua string.find的时候,在找小括号等一些特殊字符的时候,要在前边加上%,比如string.find(祝福(攻击),'祝福%(攻击%)')
Table
使用table做一些区间筛选
local a
table = {{1,5},{6,9}}
for i =1 ,#table do
if (a >= table[i][1] and a <= table[i][2]) then
return false
end
end