This is a part of Lua. GetTexture in this case is a method, a function as a value of a key in a table. ActionBar1 is a table set up with the methods of a standard frame. Frames are a WoW-specific thing, tables set up with a standard set of methods and a metatable.
Lua Code:
ActionBar1 = {
GetTexture = function()
-- whatever code is here
end
}
Using the following chat command will print the word "table" into your chat window:
/run print(type(ActionBar1))
And this will print the word "nil", which means you'll get an error if you try to use a method with it:
/run print(type(23571))
My suggestion would be to create a frame, create a texture with it, use SetTexture with the textureID, then use GetTexture on that frame. Here's the following steps to do this just from chat commands, one at a time:
Code:
/run TextureFinderFrame = CreateFrame("frame")
/run TextureFinderFrame:CreateTexture("TextureFinder")
/run TextureFinder:SetTexture(23571)
/run print(TextureFinder:GetTexture())
These commands were "dry coded", which means I have not tested these, but they should work.