Better tou change the thread name, you are teaching how to create scripts in O.T.S not a real scripting guide.
@function
You wrote a wrong syntax, the correct syntax is:
function aa(param1,param2,...)
--content
end
--or
local function aa(param1,param2,...)
--content
end...