lua里format打印boolean类型,如果使用了%s或%d会报如下错误:bad argument #2 to ‘format’ (string expected, got boolean)
解决方法:查了如下,把boolean转换成string再打印。
https://stackoverflow.com/questions/46056455/bad-argument-3-to-format-string-expected-got-boolean
You need to manually evaluate boolean type to string.
Try this,
string.format(“You%s need a %s”, negation, tostring(clothwear or summerwear or innerwear or southerwear or outerwear))