Skip to content

Commit

Permalink
Initial value for g_LogoBasePath (#538)
Browse files Browse the repository at this point in the history
I found error in logs about not able to check for logo path, I think it's due to g_LogoBasePath not having any value initally. Not sure if this is correct approach.
The error itself
```
L 06/01/2020 - 15:30:31: [SM] Exception reported: Invalid path. An empty path string is not valid, use "." to refer to the current working directory.
L 06/01/2020 - 15:30:31: [SM] Blaming: get5_apistats.smx
L 06/01/2020 - 15:30:31: [SM] Call stack trace:
L 06/01/2020 - 15:30:31: [SM]   [0] DirExists
L 06/01/2020 - 15:30:31: [SM]   [1] Line 160, ./scripting/get5_apistats.sp::Get5_OnSeriesInit
L 06/01/2020 - 15:30:31: [SM]   [3] Call_Finish
...
```
  • Loading branch information
tuudik authored Jun 4, 2020
1 parent 8890db8 commit 300b1ab
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scripting/get5_apistats.sp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public void OnPluginStart() {
LogDebug("OnPluginStart version=%s", PLUGIN_VERSION);
g_UseSVGCvar = CreateConVar("get5_use_svg", "1", "support svg team logos");
HookConVarChange(g_UseSVGCvar, LogoBasePathChanged);
g_LogoBasePath = g_UseSVGCvar.BoolValue ? LOGO_DIR : LEGACY_LOGO_DIR;
g_APIKeyCvar =
CreateConVar("get5_web_api_key", "", "Match API key, this is automatically set through rcon");
HookConVarChange(g_APIKeyCvar, ApiInfoChanged);
Expand Down

0 comments on commit 300b1ab

Please sign in to comment.