From 88b55055504839cf59864d146bc41db2133082b4 Mon Sep 17 00:00:00 2001 From: Linventif Date: Tue, 27 Feb 2024 02:47:54 +0100 Subject: [PATCH] add: uptime in report error --- lua/gmod_integration/shared/sh_errors.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/gmod_integration/shared/sh_errors.lua b/lua/gmod_integration/shared/sh_errors.lua index bc3a989..ad97d81 100644 --- a/lua/gmod_integration/shared/sh_errors.lua +++ b/lua/gmod_integration/shared/sh_errors.lua @@ -2,9 +2,9 @@ // Methods // -function gmInte.sendLuaErrorReport(err, realm, stack, name, id) +function gmInte.sendLuaErrorReport(err, realm, stack, name, id, uptime) if (name != "gmod_integration") then return end - if (SERVER && math.Round(RealTime()) == 0) then return end + if (SERVER && math.Round(RealTime()) == 0) then return timer.Simple(1, function() gmInte.sendLuaErrorReport(err, realm, stack, name, id, math.Round(RealTime())) end) end gmInte.http.post("/errors", { @@ -13,6 +13,7 @@ function gmInte.sendLuaErrorReport(err, realm, stack, name, id) ["stack"] = stack, ["name"] = name, ["id"] = id, + ["uptime"] = uptime || math.Round(RealTime()), ["identifier"] = SERVER && gmInte.config.id || LocalPlayer():SteamID64() } )