BadgerCode / tttdamagelogs

Damagelogs and RDM Manager for Trouble in Terrorist Town (a Garry's Mod gamemode)
GNU General Public License v3.0
20 stars 23 forks source link

Error with 'includes\modules\chttp.lua' #101

Open nowaysgit opened 11 months ago

nowaysgit commented 11 months ago
[ttt_damagelogs] Couldn't include file 'includes\modules\chttp.lua' - File not found or is empty (<nowhere>)
  1. pcall - [C]:-1
   2. unknown - addons/ttt_damagelogs/lua/damagelogs/server/discord.lua:14
    3. include - [C]:-1
     4. unknown - addons/ttt_damagelogs/lua/damagelogs/server/init.lua:43
      5. include - [C]:-1
       6. unknown - addons/ttt_damagelogs/lua/autorun/damagelog_autorun.lua:20
BadgerCode commented 11 months ago

Heyo!

Did you install the CHTTP library? There are steps here https://github.com/BadgerCode/tttdamagelogs/wiki/Discord-Notifications#1-install-chttp

mexikoedi commented 11 months ago

The DiscordWebhook config is disabled and I don't use Discord with Damagelogs but I also have this issue.

BadgerCode commented 10 months ago

Heyo! Sorry for the delay.

The error itself is harmless. The damage log code attempts to find the CHTTP library. If the library is not installed, the code continues fine without it.

The error is not supposed to be logged to console, but it seems to be logged because of a bug in GMod. https://github.com/Facepunch/garrysmod-issues/issues/2498

BadgerCode commented 10 months ago
print("Before PCALL")
local use_chttp = pcall(require, "chttp")
if use_chttp then
    print("PCALL success")
    HTTP = CHTTP
end

print("After PCALL")

image