@@ -258,10 +258,10 @@ public int callback_Confirm(Menu menu, MenuAction action, int client, int key)
258258
259259 char BonusPRruntime [512 ];
260260 Format (BonusPRruntime , sizeof (BonusPRruntime ), sql_clearPRruntime , steamID , g_EditingMap [client ], g_SelectedType [client ]);
261- SQL_TQuery (g_hDb , SQL_CheckCallback , BonusPRruntime , . prio = DBPrio_Low );
261+ SQL_TQuery (g_hDb , SQL_CheckCallback , BonusPRruntime , __LINE__ , DBPrio_Low );
262262 }
263263 }
264- SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , . prio = DBPrio_Low );
264+ SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , __LINE__ , DBPrio_Low );
265265
266266 // Looking for online player to refresh his record after deleting it.
267267 char player_steamID [32 ];
@@ -389,7 +389,7 @@ public void db_deleteSpawnLocations(int zGrp, int teleside)
389389 g_bGotSpawnLocation [zGrp ][1 ][teleside ] = false ;
390390 char szQuery [128 ];
391391 Format (szQuery , sizeof (szQuery ), sql_deleteSpawnLocations , g_szMapName , zGrp , teleside );
392- SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , _ , DBPrio_Low );
392+ SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , __LINE__ , DBPrio_Low );
393393}
394394
395395
@@ -1502,7 +1502,7 @@ public void db_viewPlayerPointsCallback(Handle owner, Handle hndl, const char[]
15021502
15031503 char updateConnections [1024 ];
15041504 Format (updateConnections , sizeof (updateConnections ), " UPDATE ck_playerrank SET connections = connections + 1 WHERE steamid = '%s ';" , g_szSteamID [client ]);
1505- SQL_TQuery (g_hDb , SQL_CheckCallback , updateConnections , _ , DBPrio_Low );
1505+ SQL_TQuery (g_hDb , SQL_CheckCallback , updateConnections , __LINE__ , DBPrio_Low );
15061506
15071507 // Debug
15081508 g_fTick [client ][1 ] = GetGameTime ();
@@ -1536,7 +1536,7 @@ public void db_viewPlayerPointsCallback(Handle owner, Handle hndl, const char[]
15361536 GetClientAuthId (client , AuthId_SteamID64 , szSteamId64 , MAX_NAME_LENGTH , true );
15371537
15381538 Format (szQuery , sizeof (szQuery ), sql_insertPlayerRank , g_szSteamID [client ], szSteamId64 , szName , g_szCountry [client ], g_szCountryCode [client ], g_szContinentCode [client ], GetTime ());
1539- SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , _ , DBPrio_Low );
1539+ SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , __LINE__ , DBPrio_Low );
15401540
15411541 // Play time
15421542 g_iPlayTimeAlive [client ] = 0 ;
@@ -3187,7 +3187,7 @@ public void db_deleteTmp(int client)
31873187 if (! IsValidClient (client ))
31883188 return ;
31893189 Format (szQuery , sizeof (szQuery ), sql_deletePlayerTmp , g_szSteamID [client ]);
3190- SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , _ , DBPrio_Low );
3190+ SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , __LINE__ , DBPrio_Low );
31913191}
31923192
31933193public void db_selectLastRun (int client )
@@ -3815,7 +3815,7 @@ public void db_prinforuntimecallback(Handle owner, Handle hndl, const char[] err
38153815
38163816 char szQuery [1024 ];
38173817 Format (szQuery , sizeof (szQuery ), sql_insertPR , szSteamID , szName , szMapName , runtime , 0 , 0.0 , 0.0 , 0.0 , 0.0 );
3818- SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , _ , DBPrio_Low );
3818+ SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , __LINE__ , DBPrio_Low );
38193819 }
38203820 else {
38213821
@@ -3827,7 +3827,7 @@ public void db_prinforuntimecallback(Handle owner, Handle hndl, const char[] err
38273827
38283828 char szQuery [1024 ];
38293829 Format (szQuery , sizeof (szQuery ), sql_insertPR , szSteamID , szName , szMapName , 0.0 , 0 , 0.0 , 0.0 , 0.0 , 0.0 );
3830- SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , _ , DBPrio_Low );
3830+ SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , __LINE__ , DBPrio_Low );
38313831 }
38323832
38333833 return ;
@@ -3993,7 +3993,7 @@ public void db_bonusprinforuntimecallback(Handle owner, Handle hndl, const char[
39933993 zonegroup = SQL_FetchInt (hndl , 1 );
39943994
39953995 Format (szQuery , sizeof (szQuery ), sql_insertPR , szSteamID , szName , szMapName , runtime , zonegroup , 0.0 , 0.0 , 0.0 , 0.0 );
3996- SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , _ , DBPrio_Low );
3996+ SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , __LINE__ , DBPrio_Low );
39973997
39983998 }
39993999 else {
@@ -4009,7 +4009,7 @@ public void db_bonusprinforuntimecallback(Handle owner, Handle hndl, const char[
40094009 char szQuery [1024 ];
40104010
40114011 Format (szQuery , sizeof (szQuery ), sql_insertPR , szSteamID , szName , szMapName , 0.0 , zonegroup , 0.0 , 0.0 , 0.0 , 0.0 );
4012- SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , _ , DBPrio_Low );
4012+ SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , __LINE__ , DBPrio_Low );
40134013
40144014 }
40154015
@@ -4025,7 +4025,7 @@ public void db_UpdatePRinfo_WithRuntime(int client, char szSteamID[32], int zGro
40254025 char szQuery [2048 ];
40264026 //PrintToConsole(client, "%f || %f || %f || %f || %f\n", g_fTimeinZone[client][zGroup], g_fCompletes[client][zGroup], g_fAttempts[client][zGroup], g_fstComplete[client][zGroup], runtime);
40274027 Format (szQuery , sizeof (szQuery ), sql_updatePrinfo_withruntime , g_fTimeinZone [client ][zGroup ], g_fCompletes [client ], g_fAttempts [client ][zGroup ], g_fstComplete [client ][zGroup ], runtime , szSteamID , g_szMapName , zGroup );
4028- SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , . prio = DBPrio_Low );
4028+ SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , __LINE__ , DBPrio_Low );
40294029}
40304030//this is called whenever the player's time stops and he is not in a end zone (map/bonus/stage)
40314031public void db_UpdatePRinfo (int client , char szSteamID [32 ], int zGroup )
@@ -4036,7 +4036,7 @@ public void db_UpdatePRinfo(int client, char szSteamID[32], int zGroup)
40364036 char szQuery [2048 ];
40374037 //PrintToConsoleAll("%f || %f || %f || %f\n", g_fTimeinZone[client][zGroup], g_fCompletes[client][zGroup], g_fAttempts[client][zGroup], g_fstComplete[client][zGroup]);
40384038 Format (szQuery , sizeof (szQuery ), sql_updatePrinfo , g_fTimeinZone [client ][zGroup ], g_fCompletes [client ][zGroup ], g_fAttempts [client ][zGroup ], g_fstComplete [client ][zGroup ], szSteamID , g_szMapName , zGroup );
4039- SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , . prio = DBPrio_Low );
4039+ SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , __LINE__ , DBPrio_Low );
40404040}
40414041
40424042/* ===================================
@@ -4801,7 +4801,7 @@ public void db_checkAndFixZoneIdsCallback(Handle owner, Handle hndl, const char[
48014801 {
48024802 char szQuery [256 ];
48034803 Format (szQuery , sizeof (szQuery ), sql_deleteMapZones , g_szMapName );
4804- SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , _ , DBPrio_Low );
4804+ SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , __LINE__ , DBPrio_Low );
48054805 // SQL_FastQuery(g_hDb, szQuery);
48064806
48074807 for (int k = 0 ; k < checker ; k ++ )
@@ -5575,12 +5575,12 @@ public void db_insertLastPositionCallback(Handle owner, Handle hndl, const char[
55755575 if (SQL_HasResultSet (hndl ) && SQL_FetchRow (hndl ))
55765576 {
55775577 Format (szQuery , sizeof (szQuery ), sql_updatePlayerTmp , g_fPlayerCordsLastPosition [client ][0 ], g_fPlayerCordsLastPosition [client ][1 ], g_fPlayerCordsLastPosition [client ][2 ], g_fPlayerAnglesLastPosition [client ][0 ], g_fPlayerAnglesLastPosition [client ][1 ], g_fPlayerAnglesLastPosition [client ][2 ], g_fPlayerLastTime [client ], szMapName , tickrate , stage , zgroup , szSteamID );
5578- SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , _ , DBPrio_Low );
5578+ SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , __LINE__ , DBPrio_Low );
55795579 }
55805580 else
55815581 {
55825582 Format (szQuery , sizeof (szQuery ), sql_insertPlayerTmp , g_fPlayerCordsLastPosition [client ][0 ], g_fPlayerCordsLastPosition [client ][1 ], g_fPlayerCordsLastPosition [client ][2 ], g_fPlayerAnglesLastPosition [client ][0 ], g_fPlayerAnglesLastPosition [client ][1 ], g_fPlayerAnglesLastPosition [client ][2 ], g_fPlayerLastTime [client ], szSteamID , szMapName , tickrate , stage , zgroup );
5583- SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , _ , DBPrio_Low );
5583+ SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , __LINE__ , DBPrio_Low );
55845584 }
55855585 }
55865586}
@@ -5589,7 +5589,7 @@ public void db_deletePlayerTmps()
55895589{
55905590 char szQuery [64 ];
55915591 Format (szQuery , sizeof (szQuery ), " delete FROM ck_playertemp" );
5592- SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , _ , DBPrio_Low );
5592+ SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , __LINE__ , DBPrio_Low );
55935593}
55945594
55955595public void db_ViewLatestRecords (int client )
@@ -5660,7 +5660,7 @@ public void db_InsertLatestRecords(char szSteamID[32], char szName[128], float F
56605660{
56615661 char szQuery [512 ];
56625662 Format (szQuery , sizeof (szQuery ), sql_insertLatestRecords , szSteamID , szName , FinalTime , g_szMapName );
5663- SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , _ , DBPrio_Low );
5663+ SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , __LINE__ , DBPrio_Low );
56645664}
56655665
56665666public void db_CalcAvgRunTime ()
@@ -6182,13 +6182,13 @@ public void db_Cleanup()
61826182
61836183 // tmps
61846184 Format (szQuery , sizeof (szQuery ), " DELETE FROM ck_playertemp where mapname != '%s '" , g_szMapName );
6185- SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , _ , DBPrio_Low );
6185+ SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , __LINE__ , DBPrio_Low );
61866186
61876187 // times
6188- SQL_TQuery (g_hDb , SQL_CheckCallback , " DELETE FROM ck_playertimes where runtimepro = -1.0" , _ , DBPrio_Low );
6188+ SQL_TQuery (g_hDb , SQL_CheckCallback , " DELETE FROM ck_playertimes where runtimepro = -1.0" , __LINE__ , DBPrio_Low );
61896189
61906190 // fluffys pointless players
6191- SQL_TQuery (g_hDb , SQL_CheckCallback , " DELETE FROM ck_playerrank WHERE `points` <= 0" , _ , DBPrio_Low );
6191+ SQL_TQuery (g_hDb , SQL_CheckCallback , " DELETE FROM ck_playerrank WHERE `points` <= 0" , __LINE__ , DBPrio_Low );
61926192
61936193}
61946194
@@ -6214,19 +6214,19 @@ public void db_UpdateLastSeen(int client)
62146214 else if (g_DbType == SQLITE )
62156215 Format (szQuery , sizeof (szQuery ), sql_UpdateLastSeenSQLite , g_szSteamID [client ]);
62166216
6217- SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , _ , DBPrio_Low );
6217+ SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , __LINE__ , DBPrio_Low );
62186218 }
62196219}
62206220
62216221/* ===================================
62226222= DEFAULT CALLBACKS =
62236223===================================*/
62246224
6225- public void SQL_CheckCallback (Handle owner , Handle hndl , const char [] error , any data )
6225+ public void SQL_CheckCallback (Handle owner , Handle hndl , const char [] error , int line )
62266226{
62276227 if (hndl == null )
62286228 {
6229- LogStackTrace (" [SurfTimer] SQL Error (SQL_CheckCallback) : %s " , error );
6229+ LogStackTrace (" [SurfTimer] (SQL_CheckCallback) SQL Error from line %d : %s " , line , error );
62306230 return ;
62316231 }
62326232}
@@ -6311,7 +6311,7 @@ public void db_viewPlayerOptionsCallback(Handle owner, Handle hndl, const char[]
63116311 // "INSERT INTO ck_playeroptions2 (steamid, timer, hide, sounds, chat, viewmodel, autobhop, checkpoints, centrehud, module1c, module2c, module3c, module4c, module5c, module6c, sidehud, module1s, module2s, module3s, module4s, module5s) VALUES('%s', '%i', '%i', '%i', '%i', '%i', '%i', '%i', '%i', '%i', '%i', '%i', '%i', '%i', '%i', '%i', '%i', '%i', '%i', '%i', '%i');";
63126312
63136313 Format (szQuery , sizeof (szQuery ), sql_insertPlayerOptions , g_szSteamID [client ]);
6314- SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , _ , DBPrio_Low );
6314+ SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , __LINE__ , DBPrio_Low );
63156315
63166316 g_bTimerEnabled [client ] = true ;
63176317 g_bHide [client ] = false ;
@@ -6371,7 +6371,7 @@ public void db_updatePlayerOptions(int client)
63716371 {
63726372 Format(szQuery, sizeof(szQuery), sql_updatePlayerOptions, BooltoInt(g_bTimerEnabled[client]), BooltoInt(g_bHide[client]), BooltoInt(g_bEnableQuakeSounds[client]), BooltoInt(g_bHideChat[client]), BooltoInt(g_bViewModel[client]), BooltoInt(g_bAutoBhopClient[client]), BooltoInt(g_bCheckpointsEnabled[client]), g_SpeedGradient[client], g_SpeedMode[client], BooltoInt(g_bCenterSpeedDisplay[client]), BooltoInt(g_bCentreHud[client]), g_iTeleSide[client], g_iCentreHudModule[client][0], g_iCentreHudModule[client][1], g_iCentreHudModule[client][2], g_iCentreHudModule[client][3], g_iCentreHudModule[client][4], g_iCentreHudModule[client][5], BooltoInt(g_bSideHud[client]), g_iSideHudModule[client][0], g_iSideHudModule[client][1], g_iSideHudModule[client][2], g_iSideHudModule[client][3], g_iSideHudModule[client][4], BooltoInt(g_iPrespeedText[client]), BooltoInt(g_iCpMessages[client]), BooltoInt(g_iWrcpMessages[client]), BooltoInt(g_bAllowHints[client]), g_iCSDUpdateRate[client], g_fCSD_POS_X[client], g_fCSD_POS_Y[client], g_iCSD_R[client], g_iCSD_G[client], g_iCSD_B[client], g_PreSpeedMode[client], g_szSteamID[client]);
63736373 //Format(szQuery, 1024, sql_updatePlayerOptions, BooltoInt(g_bTimerEnabled[client]), BooltoInt(g_bHide[client]), BooltoInt(g_bEnableQuakeSounds[client]), BooltoInt(g_bHideChat[client]), BooltoInt(g_bViewModel[client]), BooltoInt(g_bAutoBhopClient[client]), BooltoInt(g_bCheckpointsEnabled[client]), g_SpeedGradient[client], g_SpeedMode[client], BooltoInt(g_bCenterSpeedDisplay[client]), BooltoInt(g_bCentreHud[client]), g_iTeleSide[client], g_iCentreHudModule[client][0], g_iCentreHudModule[client][1], g_iCentreHudModule[client][2], g_iCentreHudModule[client][3], g_iCentreHudModule[client][4], g_iCentreHudModule[client][5], BooltoInt(g_bSideHud[client]), g_iSideHudModule[client][0], g_iSideHudModule[client][1], g_iSideHudModule[client][2], g_iSideHudModule[client][3], g_iSideHudModule[client][4], BooltoInt(g_iPrespeedText[client]), BooltoInt(g_iCpMessages[client]), BooltoInt(g_iWrcpMessages[client]), BooltoInt(g_bAllowHints[client]), BooltoInt(g_bTimeleftDisplay[client]), g_szSteamID[client]);
6374- SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , _ , DBPrio_Low );
6374+ SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , __LINE__ , DBPrio_Low );
63756375 }
63766376}
63776377
@@ -10402,7 +10402,7 @@ public void db_insertAnnouncement(char szName[128], char szMapName[128], int szM
1040210402 char szEscServerName [128 ];
1040310403 SQL_EscapeString (g_hDb , g_sServerName , szEscServerName , sizeof (szEscServerName ));
1040410404 Format (szQuery , 512 , " INSERT INTO `ck_announcements` (`server`, `name`, `mapname`, `mode`, `time`, `group`) VALUES ('%s ', '%s ', '%s ', '%i ', '%s ', '%i ');" , szEscServerName , szName , szMapName , szMode , szTime , szGroup );
10405- SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , _ , DBPrio_Low );
10405+ SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , __LINE__ , DBPrio_Low );
1040610406}
1040710407
1040810408public void db_checkAnnouncements ()
@@ -11126,7 +11126,7 @@ public void db_updateMapRankedStatus()
1112611126 g_bRankedMap = true ;
1112711127 }
1112811128
11129- SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , _ , DBPrio_Low );
11129+ SQL_TQuery (g_hDb , SQL_CheckCallback , szQuery , __LINE__ , DBPrio_Low );
1113011130}
1113111131
1113211132public void db_selectPracWrcpRecord (int client , int style , int stage )
0 commit comments