local Cube = Map.Cube
local error = Cube:Connect("OnBodyEntered", __SCRIPT__, "ToCallFunc") -- the value of error will be nil however if we try to conenct again:
error = Cube:Connect("OnBodyEntered", __SCRIPT__, "ToCallFunc") -- the value of error will be a string of: 'OnBodyEntered(Signal) is already connected to a function!'
error = Cube:Connect("OnBodyEntered", __SCRIPT__, "AnotherFunction") -- the value of error will be a string as well. Clua does not support binding a single signal to multiple functions. However this is going to be allowed in near-future. It will return the same error: : 'OnBodyEntered(Signal) is already connected to a function!'
-- Keep in mind that it will only give a error and will not distrupt already-connected connection!
function ToCallFunc(body)
printl(body.IsA())
end