I am new to lua,i just don't know why,does it related to environment or the libarary?it drive me crazy, i being search the answer for 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 are two things going on here:
nil
ny default. I recommend using a linting tool like LuaInspect to detect these typos before they bite you.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.