Posted 08 January 2014 - 02:09 PM
Hi.
I'm trying to create a function to work for all colors to see if the redstone of that color is active or not, so I have created this function.
On the code if i change the cor_ler(), put comment on local args and change the args[1] into orange, it will return as it should, but witht the actual code i get "red_status:3: attempt to index ? (a nil value).
If i make a
it will show me the right name AKA orange on this case, so what I should do here ?
I'm trying to create a function to work for all colors to see if the redstone of that color is active or not, so I have created this function.
function cor_ler(...)
local args = {...}
local cor = rs.testBundledInput("right", colors.args[1])
return cor
end
On the code if i change the cor_ler(), put comment on local args and change the args[1] into orange, it will return as it should, but witht the actual code i get "red_status:3: attempt to index ? (a nil value).
If i make a
print(args[1])
it will show me the right name AKA orange on this case, so what I should do here ?