Modification d'un fichier lua pour la peau Rainmeter « Avez-vous besoin d'une veste » obtenir l'erreur dans le titre de ce codemauvais argument # 3 à 'format' (chaîne attendue, got boolean)?
--[[ 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
Il est censé donner les vêtements correct en fonction Température. J'ai essayé avec différents endroits pour la variation de température, et la seule fois que j'obtiens l'erreur est quand la température est sur Ss_limit. Je n'ai pas beaucoup d'expérience de codage pour vous remercier à l'avance
Cette ligne 'vêtements de plein air locale = (temp