ScriptContext
Mostrar obsoleto
*Este contenido se traduce usando la IA (Beta) y puede contener errores. Para ver esta página en inglés, haz clic en aquí.
Este servicio controla todos los objetos BaseScript . La mayoría de las propiedades y métodos de este servicio están bloqueados para uso interno.
Resumen
Métodos
Limpita el tiempo que un script se permite ejecutar sin rendirse.
Eventos
Despedido cuando ocurre un error.
Propiedades
Métodos
SetTimeout
()
Limpita el tiempo que un script se permite ejecutar sin rendirse.
Parámetros
Valor predeterminado: ""
Devuelve
()
Eventos
Error
Despedido cuando ocurre un error.
Parámetros
Muestras de código
When an error occurs, this example prints the name of the script that errored, the reason it errored, and a trace of the error.
ScriptContext.Error
local ScriptContext = game:GetService("ScriptContext")
local function onError(message, trace, script)
print(script:GetFullName(), "errored!")
print("Reason:", message)
print("Trace:", trace)
end
ScriptContext.Error:Connect(onError)
-- Somewhere, in another script
error("Error occurred!")