Skip to content

Commit

Permalink
fix for [Surftimer] SQL Error (db_selectPlayerRankCallback) error (#299)
Browse files Browse the repository at this point in the history
* fix for [Surftimer] SQL Error (db_selectPlayerRankCallback) error

* fix array out of bounds error OnTriggerOutput
  • Loading branch information
dPexxIAM authored Sep 14, 2021
1 parent fa14bef commit 44b5ed1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions addons/sourcemod/scripting/surftimer/hooks.sp
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,8 @@ public Action OnMultipleTrigger3(int entity, int client)

public Action OnTriggerOutput(const char[] output, int caller, int activator, float delay)
{
if (!IsValidClient(client)) return Plugin_Continue;

// Block Output when player use a teleport command
if(g_bTeleByCommand[activator])
{
Expand Down
2 changes: 1 addition & 1 deletion addons/sourcemod/scripting/surftimer/sql.sp
Original file line number Diff line number Diff line change
Expand Up @@ -7785,7 +7785,7 @@ public void db_selectPlayerRank(int client, int rank, char szSteamId[32])
{
char szQuery[1024];

if (StrContains(szSteamId, "none", false)!= -1) // Select Rank Number
if (StrContains(szSteamId, "none", false)!= -1 && rank > 0) // Select Rank Number
{
g_rankArg[client] = rank;
rank -= 1;
Expand Down

0 comments on commit 44b5ed1

Please sign in to comment.