0
编辑LUA文件的Rainmeter的皮肤“你需要一个外套” 得到错误的标题为这个代码错误的参数#3到'格式'(预期的字符串,得到布尔值)?
--[[ Given the current temperature, return the appropriate
string for the main string meter ]]
local function getMainString(temp)
local negation = (temp > Settings.Ss_Limit) and " don't" or ""
local summerwear = (temp < Settings.Ss_Limit) and (temp > Settings.Vest_Limit) and "shirt and shorts"
local innerwear = (temp < Settings.Vest_Limit) and (temp > Settings.Jacket_Limit) and "vest"
local southerwear = (temp < Settings.Jacket_Limit) and (temp > Settings.Coat_Limit) and "jacket"
local outerwear = (temp < Settings.Coat_Limit) and "coat"
return string.format("You%s need a %s", negation, (summerwear or innerwear or southerwear or outerwear))
end
它应该给基于正确的服装温度。我已经尝试了不同的地点温度变化,并且唯一一次我得到错误是当温度超过Ss_limit。我没有太多的编码经验,所以预先感谢您
此行'本地外衣=(温度