文字显示报错修改

dev_chengFeng
jiaoyangna 2021-11-27 17:13:28 +08:00
parent ae826de307
commit 37de4c4450
4 changed files with 32 additions and 24 deletions

View File

@ -118,13 +118,15 @@ end
function QianKunBoxBuyOnePanel:GetSendStr() function QianKunBoxBuyOnePanel:GetSendStr()
local str = "" local str = ""
for k,v in ipairs(lotterySetting[this.recruitType].TenTimesMustGetItem) do if lotterySetting[this.recruitType] and lotterySetting[this.recruitType].TenTimesMustGetItem and #lotterySetting[this.recruitType].TenTimesMustGetItem > 0 then
if str == "" then for k,v in ipairs(lotterySetting[this.recruitType].TenTimesMustGetItem) do
str = str.."赠送" if str == "" then
else str = str.."赠送"
str = str.."" else
str = str..""
end
str = str..v[2]..""..ItemConfig[v[1]].Name
end end
str = str..v[2]..""..ItemConfig[v[1]].Name
end end
return str return str
end end

View File

@ -124,13 +124,15 @@ end
function QianKunBoxBuyTenPanel:GetSendStr() function QianKunBoxBuyTenPanel:GetSendStr()
local str = "" local str = ""
for k,v in ipairs(lotterySetting[this.recruitType].TenTimesMustGetItem) do if lotterySetting[this.recruitType] and lotterySetting[this.recruitType].TenTimesMustGetItem and #lotterySetting[this.recruitType].TenTimesMustGetItem > 0 then
if str == "" then for k,v in ipairs(lotterySetting[this.recruitType].TenTimesMustGetItem) do
str = str.."赠送" if str == "" then
else str = str.."赠送"
str = str.."" else
str = str..""
end
str = str..v[2]..""..ItemConfig[v[1]].Name
end end
str = str..v[2]..""..ItemConfig[v[1]].Name
end end
return str return str
end end

View File

@ -106,13 +106,15 @@ end
function SecretBoxBuyOnePanel:GetSendStr() function SecretBoxBuyOnePanel:GetSendStr()
local str = "" local str = ""
for k,v in ipairs(lotterySetting[this.recruitType].TenTimesMustGetItem) do if lotterySetting[this.recruitType] and lotterySetting[this.recruitType].TenTimesMustGetItem and #lotterySetting[this.recruitType].TenTimesMustGetItem > 0 then
if str == "" then for k,v in ipairs(lotterySetting[this.recruitType].TenTimesMustGetItem) do
str = str.."赠送" if str == "" then
else str = str.."赠送"
str = str.."" else
str = str..""
end
str = str..v[2]..""..ItemConfig[v[1]].Name
end end
str = str..v[2]..""..ItemConfig[v[1]].Name
end end
return str return str
end end

View File

@ -116,13 +116,15 @@ end
function SecretBoxBuyTenPanel:GetSendStr() function SecretBoxBuyTenPanel:GetSendStr()
local str = "" local str = ""
for k,v in ipairs(lotterySetting[this.recruitType].TenTimesMustGetItem) do if lotterySetting[this.recruitType] and lotterySetting[this.recruitType].TenTimesMustGetItem and #lotterySetting[this.recruitType].TenTimesMustGetItem > 0 then
if str == "" then for k,v in ipairs(lotterySetting[this.recruitType].TenTimesMustGetItem) do
str = str.."赠送" if str == "" then
else str = str.."赠送"
str = str.."" else
str = str..""
end
str = str..v[2]..""..ItemConfig[v[1]].Name
end end
str = str..v[2]..""..ItemConfig[v[1]].Name
end end
return str return str
end end