Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有以下代码应该只打印一个数字,但它会打印提到的错误:
print( math.abs( tonumber(TColor, 16) - tonumber(FColor, 16) ) / 100 * (math.abs(minV - maxV) / 100 * curV) + tonumber(FColor, 16) )
甚至tostring( math...... )无法解决
tostring( math...... )
发生错误是因为其中一个TcolororFcolor是nil。错误被抛出tonumber()。
Tcolor
Fcolor
nil
tonumber()
你可以看到它在这里被复制。