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]