Raised This Month: $51 Target: $400
 12% 

Solved Fixing ckSurf, some weird problems


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CookieB
Member
Join Date: Apr 2016
Location: Germany
Old 05-11-2017 , 04:12   Fixing ckSurf, some weird problems
Reply With Quote #1

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

Last edited by CookieB; 05-11-2017 at 04:55.
CookieB is offline
CookieB
Member
Join Date: Apr 2016
Location: Germany
Old 05-11-2017 , 04:18   Re: Fixing ckSurf, some weird problems
Reply With Quote #2

Forget it, I'm an idiot... Can't delete the post.
CookieB is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:21.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode