Warning when RbxScriptSignal:connect() called with non-function

EDIT: Never mind, this was actually fixed in February. My fault.

One of the most common (and hardest to debug errors) happens when you connect to an event and pass in an invalid function name. You don’t know which script or line number caused the error.

function onPlayerAdded(player)
   print("Doing stuff yo")
end

game.Players.PlayerAdded:connect(onplayerAdded)

[strike]Later, this prints in the output. no line numbers or ways to debug.
Attempt to call a nil value

Suggestion
The connect function should create a warning if the listener argument is not a function.[/strike]

[code]function onPlayerAdded(player)
print(“Doing stuff yo”)
end

game.Players.PlayerAdded:connect(onplayerAdded)[/code]
[s]Event listener must be a function

It can’t be an error because that would break existing scripts. Is it possible for a warning to give the line number/script it occurred in?[/s]

It can be and is an error:

game.Players.PlayerAdded:connect(onplayerAdded)
> Attempt to connect failed: Passed value is not a function

That error was added a while ago. You must be seeing some other problem currently if you’re getting “attempt to call a nil value”.

Edit: Resolved.