Hello,
So I have this piece of code which looks sound to begin with:
Code:
char sql_selectPersonalRecords[] = "SELECT runtimepro, name FROM ck_playertimes WHERE mapname = '%s' AND steamid = '%s' AND runtimepro > 0.0";
Code:
public void db_viewRecord(int client, char szSteamId[32], char szMapName[128])
{
char szQuery[512];
// SELECT runtimepro, name FROM ck_playertimes WHERE mapname = '%s' AND steamid = '%s' AND runtimepro > 0.0
Handle pack = CreateDataPack();
WritePackString(pack, szMapName);
WritePackString(pack, szSteamId);
WritePackCell(pack, client);
Format(szQuery, 512, sql_selectPersonalRecords, szSteamId, szMapName);
PrintToChatAll(szQuery);
SQL_TQuery(g_hDb, SQL_ViewRecordCallback, szQuery, pack, DBPrio_Low);
}
To mention the PrintToChat was inserted by me for debugging purpose.
But the result is rather suspicious looking:
Any ideas why Format would format the parameters in reverse order?
--edit: Compiled with latest stable SM