Why do I get the error "attempt to call a nil value"? It doesn't tell me why or where, which must mean it can't find the Dummy function. But I forward declared it, so it should see it.
local Dummy
local function Start()
print("this line is printed")
ErrorReport(Dummy)
print("this line is printed")
end
local function Dummy()
print("this line is not printed")
end
function ErrorReport(...)
print("this line is printed")
local ok, error = pcall(...)
if not ok then print("Error: "..error) end
end
Start()