mirror of
https://github.com/gmod-integration/lua.git
synced 2025-03-15 22:07:34 +00:00
fix: send the 100nt error if repeat
This commit is contained in:
parent
f7bb6d8795
commit
bbe66a70ae
|
@ -1,14 +1,15 @@
|
||||||
local cacheErrors = {}
|
local cacheErrors = {}
|
||||||
function gmInte.sendLuaErrorReport(err, realm, stack, name, id)
|
function gmInte.sendLuaErrorReport(err, realm, stack, name, id)
|
||||||
|
local count = cacheErrors[err] && cacheErrors[err].count + 1 || 1
|
||||||
cacheErrors[err] = {
|
cacheErrors[err] = {
|
||||||
["time"] = CurTime(),
|
["time"] = CurTime(),
|
||||||
["count"] = cacheErrors[err] && cacheErrors[err].count + 1 || 1,
|
["count"] = count,
|
||||||
}
|
}
|
||||||
|
|
||||||
if !gmInte.config.id || !gmInte.config.token then return end
|
if !gmInte.config.id || !gmInte.config.token then return end
|
||||||
if CLIENT && !IsValid(LocalPlayer()) then return end
|
if CLIENT && !IsValid(LocalPlayer()) then return end
|
||||||
local count = cacheErrors[err].count
|
|
||||||
timer.Simple(0.5, function()
|
timer.Simple(0.5, function()
|
||||||
|
if !cacheErrors[err] then return end
|
||||||
if cacheErrors[err].count != count then
|
if cacheErrors[err].count != count then
|
||||||
if cacheErrors[err].count != 100 then return end
|
if cacheErrors[err].count != 100 then return end
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue
Block a user