Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

MessageOut Event

Asked by
Muoshuu 580 Moderation Voter
11 years ago

Is there a way to find out which script errored?

3 answers

Log in to vote
3
Answered by
Merely 2122 Moderation Voter Community Moderator
11 years ago

Instead of using the LogService for getting script errors, I recommend using ScriptContext's error event. It gives you a reference to the script object that errored, as well as the stack trace and the error message.

game:GetService("ScriptContext").Error:connect(function(message, trace, script)
    print(script:GetFullName().." errored!")
    print("Reason: "..message)
    print("Trace: "..trace)
end)

(This example was taken from the wiki page for ScriptContext.Error)

Ad
Log in to vote
1
Answered by 11 years ago

You can use this event to see the errors. You can also use the log service, although it might not be enabled right now.

Log in to vote
-2
Answered by
Nytroz 15
11 years ago

I believe it is the Output Window

0
I mean, when the event is fired I want to know which script errored Muoshuu 580 — 11y
0
Script Performance? Nytroz 15 — 11y
0
I also mean In-Game Muoshuu 580 — 11y
0
I'm not sure how to check In-Game, but your best bet is running server Tools-Test-Play Solo Nytroz 15 — 11y
0
I'm creating an In-Game output system Muoshuu 580 — 11y

Answer this question