surftimer/SurfTimer-discord

Errors on test

IG-PhantomX opened this issue · 4 comments

sm_ck_discordtest

[SurfTimer-Discord] Sending main record test message.
L 03/14/2023 - 02:10:32: [SM] Exception reported: Client index 0 is invalid
L 03/14/2023 - 02:10:32: [SM] Blaming: SurfTimer-discord.smx
L 03/14/2023 - 02:10:32: [SM] Call stack trace:
L 03/14/2023 - 02:10:32: [SM] [0] GetClientAuthId
L 03/14/2023 - 02:10:32: [SM] [1] Line 920, SurfTimer-discord.sp::GetProfilePictureURL
L 03/14/2023 - 02:10:32: [SM] [2] Line 491, SurfTimer-discord.sp::surftimer_OnNewRecord
L 03/14/2023 - 02:10:32: [SM] [3] Line 206, SurfTimer-discord.sp::CommandDiscordTest

I used the packaged version. The .sp files won't compile for me, they are producing lots of errors.

Did you set sm_surftimer_discord_steam_api_key accordingly?

If it is looking for Client with Index 0 then maybe you ran the command through the server console?
This will not work as the plugin will attempt to grab the profile picture of the Client who initiated the test command and the server console does not have that.

Hi @IG-PhantomX, as @tslashd said, you cannot run the test command from the server's console.
I've added an error message instead of an Exception in v2.5.5 in order to prevent this situation.