问题
Not to sure how to fix this error. I read there was a change but have no idea how to fix it.
function convert_sens(unconvertedSens)
return 0.002 * math.pow(10, unconvertedSens / 50) end
The error code was:
attempt to call a nil value (field 'pow')
回答1:
math.pow
is deprecated since Lua 5.3 and even if your framework doesn't provide any math library simply use the exponentiation operator ^
.
So instead of math.pow(x, y)
simply write x^y
来源:https://stackoverflow.com/questions/65664703/math-pow-with-logitech-g-hub