Uh oh,看起来问题在2.7.0alpha4(642)
又一次出现了
Koishi调用D:\Stuff\KOISHI2\DICE231\plugin\tarot.lua函数tarot失败!
D:\Stuff\KOISHI2\DICE231\plugin\tarot.lua:15: attempt to concatenate a boolean value
function tarot(msg)
local sub = getUserConf(msg.fromQQ, "activesub", false)
local userTarot = getUserToday(msg.fromQQ, "userLastTarot", 0)
if (userTarot == 0) then
local lastTarot = drawDeck(0, msg.fromQQ, "塔罗牌全单卡")
setUserToday(msg.fromQQ, "userLastTarot", lastTarot)
end
if (sub == true) then
str = "命运流转,这里是{nick}今日的占卜结果\n" ..
getUserToday(msg.fromQQ, "userLastTarot", 0) .. "\n这个结果,希望能对你有所帮助"
else
str = "{nick}似乎还没有激活意识订阅服务呢,无法享受娱乐功能的快乐哦"
end
return str
end
已经确认不论是从未被使用过的UserToday变量还是已经使用的UserToday变量都会出现这个问题,即所有UserToday存在的变量都会被Dice识别为boolean值进行比较