generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Does this exist

Previous Thread :: Next Thread 
ThrashingThunder is not online. ThrashingThunder
Joined: 03 Oct 2011
Total Posts: 2388
05 Mar 2014 03:51 PM
Some kind of function thing that triggers when a error occurs? This would be incredibly useful for me..

Output.ErrorOccured:connect(function()
print'Hello'
end)
Report Abuse
StealthKing95 is not online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
05 Mar 2014 03:54 PM
Yes.

http://wiki.roblox.com/index.php?title=Error_(Event)
Report Abuse
ThrashingThunder is not online. ThrashingThunder
Joined: 03 Oct 2011
Total Posts: 2388
05 Mar 2014 03:54 PM
:D
Report Abuse
ThrashingThunder is not online. ThrashingThunder
Joined: 03 Oct 2011
Total Posts: 2388
05 Mar 2014 03:56 PM
Thanks for the link, but can you provide me a loop to constantly check for a script error? But only a error from GameScript?
Report Abuse
FreeScriptMaker is not online. FreeScriptMaker
Joined: 29 Nov 2013
Total Posts: 2275
05 Mar 2014 03:56 PM
There is an event that allows you to capture all output also but I don't remember what it is named.
Report Abuse
StealthKing95 is not online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
05 Mar 2014 03:56 PM
"Constantly check for an error"

That function runs every time an error happens why would you need a loop?
Report Abuse
ThrashingThunder is not online. ThrashingThunder
Joined: 03 Oct 2011
Total Posts: 2388
05 Mar 2014 03:58 PM
Oh, perhaps. lol, but I only want it to do the required code if a certain script errors.
Report Abuse
FreeScriptMaker is not online. FreeScriptMaker
Joined: 29 Nov 2013
Total Posts: 2275
05 Mar 2014 03:58 PM
The event fires every time there is an error. You can check for just one script by using the script Instance in the function parameters.
Report Abuse
ThrashingThunder is not online. ThrashingThunder
Joined: 03 Oct 2011
Total Posts: 2388
05 Mar 2014 04:01 PM
This script might be just what I'm lookin' for..
Report Abuse
StealthKing95 is not online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
05 Mar 2014 04:05 PM
Ill make it an example:

the_script = workspace.MyScript

game:GetService("ScriptContext").Error:connect(function(message, trace, script)
if script.Name == the_script then
print("DA EPIK SCRIPT FAILED TO RUN")
end
end)
Report Abuse
ThrashingThunder is not online. ThrashingThunder
Joined: 03 Oct 2011
Total Posts: 2388
05 Mar 2014 04:07 PM
Ty ;D
Report Abuse
FreeScriptMaker is not online. FreeScriptMaker
Joined: 29 Nov 2013
Total Posts: 2275
05 Mar 2014 04:08 PM
@StealthKing95
You can't compare a String to userdata in Lua.
Report Abuse
StealthKing95 is not online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
05 Mar 2014 04:08 PM
The argument is not a string
Report Abuse
StealthKing95 is not online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
05 Mar 2014 04:09 PM
WAIT HAHHAHAHAHAHAHA


Sorry.
Report Abuse
StealthKing95 is not online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
05 Mar 2014 04:09 PM
hey op,

change:

if script.Name == the_script then


to:


if script.Name == the_script.Name then
Report Abuse
FreeScriptMaker is not online. FreeScriptMaker
Joined: 29 Nov 2013
Total Posts: 2275
05 Mar 2014 04:10 PM
the_script = workspace.MyScript

if script.Name == the_script then

The name of the script is a String

The variable the_script is an instance
Report Abuse
ThrashingThunder is not online. ThrashingThunder
Joined: 03 Oct 2011
Total Posts: 2388
05 Mar 2014 04:10 PM
What does 'op' mean?

I never knew what it stood for.
Report Abuse
StealthKing95 is not online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
05 Mar 2014 04:11 PM
Original Poster a.k.a OP
Report Abuse
ThrashingThunder is not online. ThrashingThunder
Joined: 03 Oct 2011
Total Posts: 2388
05 Mar 2014 04:12 PM
Ohh, in that case. I just used the template from the wikia, and modified it.

Thank you all! I am so glad there is a event / function for Errors!
Report Abuse
StealthKing95 is not online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
05 Mar 2014 04:13 PM
Well yes you should be glad its only been usable for a month or so
Report Abuse
ThrashingThunder is not online. ThrashingThunder
Joined: 03 Oct 2011
Total Posts: 2388
05 Mar 2014 04:15 PM
Say what..
Report Abuse
ThrashingThunder is not online. ThrashingThunder
Joined: 03 Oct 2011
Total Posts: 2388
05 Mar 2014 04:28 PM
If my strategy with this script works, and they remove it, I am going to melt into a milion tiny blocks.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image