null - Lua Script:attempt to call global 'tonubmer' (a nil value) -
i new lua,i don't know why,does related environment or libarary?it drive me crazy, being search answer hours.
function gradient() local maxstep = 10; local starcolor="41b0f7"; local endcolor ="1622df"; local sb = tonubmer(string.sub(starcolor,1,2),16); return sb; end print(gradient());
there 2 things going on here:
- lua standard library functions tonumber global variables.
- if try access global variable not exist (in case, tonu*bm*er)
nil
ny default.
i recommend using linting tool luainspect detect these typos before bite you.
Comments
Post a Comment