No I want to access/test the value of the variable, I want the same function to toggle both on and off so:
- Code: Select all
local data = {}
if data["layer1.control1.alpha"] == 255 then
data["layer1.control1.alpha"] = 128
else if (data["layer1.control1.alpha"] == 128) then
data["layer.control.alpha"] = 255
end
gre.setdata(data)
end
Let me be clear, the code above
does not work. The code above is how I thought this would work until I discovered that it does not. I believe that when you create local data = {} data is empty, therefore, Jason, I believe that what you posted will also fail. Am I missing something?
Regards,
Chelsea