DiscordAcePerms icon indicating copy to clipboard operation
DiscordAcePerms copied to clipboard

error occurred while calling export `GetDiscordRoles` in resource `Badger_Discord_API`

Open Legacy-TacticalGamingInteractive opened this issue 1 year ago • 3 comments

[script:DiscordAcePer] SCRIPT ERROR: @DiscordAcePerms/server.lua:150: 
[script:DiscordAcePer]  An error occurred while calling export `GetDiscordRoles` in resource `Badger_Discord_API`:
[script:DiscordAcePer]   citizen:/scripting/lua/scheduler.lua:749: SCRIPT ERROR: @Badger_Discord_API/server.lua:435: bad argument #1 to 'pairs' (table expected, got boolean)
[script:DiscordAcePer]   > ref (@Badger_Discord_API/server.lua:435)
[script:DiscordAcePer] 
[script:DiscordAcePer]  ---
[script:DiscordAcePer] > RegisterPermissions (@DiscordAcePerms/server.lua:150)
[script:DiscordAcePer] > handler (@DiscordAcePerms/server.lua:205)

This happens every time someone joins. Not sure why? My Badger_Discord_API is updated to the latest version.

Is there an error similar to this above that error in the console?

"[Badger_Discord_API] ERROR: Code 200 was not reached... Returning false. [Member Data NOT FOUND] DETAILS: ....."

If so please post the full error.

NickReagan avatar Aug 23 '24 22:08 NickReagan

Currently turned off Debugging as it was throwing that a lot as well.

I just checked someone, they are in the Discord but they don't yet have any roles yet as they are new. Assuming its because of that? Is there a way we can just suppress the errors then or bypass/ignore some way.


Aside from that, a different error is happening every time someone joins we get this as well:

[      script:hardcap] Connecting: Garrett
[script:DiscordAcePer] SCRIPT ERROR: @DiscordAcePerms/server.lua:153: attempt to concatenate a nil value
[script:DiscordAcePer] > RegisterPermissions (@DiscordAcePerms/server.lua:153)
[script:DiscordAcePer] > handler (@DiscordAcePerms/server.lua:205)

When we set these the false then that error happens. If we set each to true then that error goes away.

DebugScript = false,
Print_Perm_Grants_And_Removals = false,

changed to

DebugScript = true,
Print_Perm_Grants_And_Removals = true,

I believe this one is because we are using multiguild maybe? If someone isn't in ALL of the Discords this error shows?

Is there a way to disable the print errors in console or should i just comment out the prints

It seems tk occur every time someone is not in the discord

image