local function s(data)
local img = {}
for x = 1, horiAmount do
img[x] = {}
for y = 1, vertAmount do
local w, h = math.floor(data.width/horiAmount), math.floor(data.height/vertAmount)
img[x][y] = data:copy((x-1)*w, (y-1)*h, w, h)
end
end
Server.UI.List["image." .. name] = img
print("Server > Object '" .. name .. "' found!")
Server.MessToClient("ui", "img", name, data)
end
Example Image: i.imgur.com/vaB06KX.png (attached, too)
My logic is the following:
- Create a table ‘img’
- Store inside the table ‘img’ table to hold values for ‘x’
- Store there copied parts of the image.
I expect: ‘img’ has all the images stored.
What I don’t get:
‘img’ is used to be return as ‘codeaimage’, and not as ‘table’