You're (probably) getting those errors because you don't currently have the buff active. I guess WeakAuras can't handle nil values itself (I don't actually use it) so just return a zero if UnitAura didn't return anything:
Code:
function()
local _, _, _, _, _, duration, expirationTime = UnitBuff("player", "Blutschild")
return expirationTime or 0
end
or:
Code:
function()
local _, _, _, _, _, duration, expirationTime = UnitBuff("player", "Blutschild")
return expirationTime and (expirationTime - GetTime()) or 0
end
Again, as I don't actually use WeakAuras, I don't know whether it needs the remaining time or the expiration time, but either of the above should make sure it doesn't receive any scary nil values.