Passing parameters using SQL_ThreadQuery
Hi guys, i'm trying to pass parameters to SQL_ThreadQuery (not the query itself), but when i try to retrieve them, i get random values
PHP Code:
Code:
L 10/01/2019 - 19:36:49: [Test.amxx] STEAM_0:1:39264654 15.058460 5 // FIRST LOG Thanks in advance. |
Re: Passing parameters using SQL_ThreadQuery
aData[ ACCOUNT ] = szAccount
That's not how you fill up an array, correct way is to use copy or formatex Doing this way may result in filling just the first cell since the compiler is stupid it will assume that you did aData[ACCOUNT][0] = szAccount [0] So do this for all copy(aData[ ACCOUNT ], charsmax(aData[ ACCOUNT ]), szAccount) instead and test again. |
Re: Passing parameters using SQL_ThreadQuery
Quote:
This has happened to me before, but i have no idea how i fixed it, if i even did it to be honest |
Re: Passing parameters using SQL_ThreadQuery
If you are not formatting, always use copy(). There is no reason why Natsheh's recommendation wouldn't work. There has to be something else in your code that you are not including that is causing an issue.
|
Re: Passing parameters using SQL_ThreadQuery
Full code
PHP Code:
|
Re: Passing parameters using SQL_ThreadQuery
Is GetUserAccount( iClient, szAccount, charsmax( szAccount ) ); actually setting the users steam id in szAccount?
|
Re: Passing parameters using SQL_ThreadQuery
Quote:
PHP Code:
Code:
L 10/01/2019 - 19:36:49: [Test.amxx] STEAM_0:1:39264654 15.058460 5 // FIRST LOG |
Re: Passing parameters using SQL_ThreadQuery
Try this:
PHP Code:
|
Re: Passing parameters using SQL_ThreadQuery
PHP Code:
PHP Code:
UPDATE: Updating AMXX to 1.9.0 +dev5249 didn't help. I don't really understand why this happens and it's the second time it does this kind of stuff, which stops me from using this kind of enumerations. I'll try this plugin in my Linux Server even though it doesn't have mysql just to see if the parameters can be read. UPDATE 2: Output on server is even worse Code:
L 10/03/2019 - 19:43:49: [Test.amxx] STEAM_0:1:39264654 31.307519 5 PHP Code:
Code:
L 10/04/2019 - 23:13:54: [Test.amxx] function 1 - STEAM_0:1:3926465 5.000000 1 |
Re: Passing parameters using SQL_ThreadQuery
Maybe SQL_ThreadQuery() isn't able to handle an enumerator-sized array that contains string(s). I've personally passed data in the past using the below. Try doing a test, eliminating the string portion of your enumerator and see if it works. If it does, we can probably figure out a workaround.
Edit: I just tested it myself and enum sized arrays, that include strings, pass to the callback handler perfectly. PHP Code:
|
All times are GMT -4. The time now is 04:28. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.