Skip to content

Commit

Permalink
Update jse_tracker.sp
Browse files Browse the repository at this point in the history
  • Loading branch information
fxss-repository authored Sep 10, 2023
1 parent 0594c85 commit 43ad777
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions scripting/jse_tracker.sp
Original file line number Diff line number Diff line change
Expand Up @@ -605,8 +605,7 @@ public int Native_GetPlayerProgress(Handle hPlugin, int iArgC) {
char sMapName[32];
GetNativeString(5, sMapName, sizeof(sMapName));

// ProgressLookup pCallback = view_as<ProgressLookup>(GetNativeFunction(6));
Function pCallback = GetNativeFunction(6);
Function pCallback = GetNativeFunction(6); // ProgressLookup

any aData = GetNativeCell(7);

Expand All @@ -615,6 +614,10 @@ public int Native_GetPlayerProgress(Handle hPlugin, int iArgC) {
}

if (sMapName[0]) {
if (pCallback == INVALID_FUNCTION) {
ThrowError("Callback function is required with map query");
}

DB_GetProgress(iClient, hResult, iTeam, iClass, sMapName, pCallback, aData);
return -1;
}
Expand All @@ -637,7 +640,7 @@ public int Native_GetPlayerProgress(Handle hPlugin, int iArgC) {
}
}

if (pCallback) {
if (pCallback != INVALID_FUNCTION) {
Call_StartFunction(null, pCallback);
Call_PushCell(iClient);
Call_PushCell(hResult);
Expand Down

0 comments on commit 43ad777

Please sign in to comment.