Code: Select all
local pixelData = lightcanvas.newImageData(lightcanvas, 1, 1, unit.x*32+16, unit.y*32+16, 1, 1)
local r, g, b, a = pixelData.getPixel(1, 1)
result = (r > 128)
Code: Select all
bad argument #2 to ImageData:getPixel (expected number)
Code: Select all
local pixelData = lightcanvas.newImageData(lightcanvas, 1, 1, unit.x*32+16, unit.y*32+16, 1, 1)
local r, g, b, a = pixelData.getPixel(1, 1)
result = (r > 128)
Code: Select all
bad argument #2 to ImageData:getPixel (expected number)
Code: Select all
local r,g,b,a = pixelData:getPixel(1,1)
Code: Select all
function something (b,c)
self.b = b
self.c = c
end
local o = {}
o.something = something
o:something(1,2)
print(o.b) -- > 1
print(o.c) -- > 2
Code: Select all
pixelData.getPixel ( pixelData, 1, 1 )
pixelData:getPixel ( 1, 1 )
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 5 guests