Re: [REL] MySQL Plugin (Now on github!) -
Aliassassin123456 - 23.01.2014
@Misiur: yes....
Re: [REL] MySQL Plugin (Now on github!) -
Aliassassin123456 - 23.01.2014
Problem Solved, i remove msvcr110.dll and msvcp110.dll from my System32 and SysWOW64 and then i remove all VCREDISTs and reinstall them and it's now solved thanks guys
Re: [REL] MySQL Plugin (Now on github!) - HuSs3n - 24.01.2014
i am getting this ERROR after updating from version 20 to 34
Код:
[21:17:13] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[21:17:13] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[21:17:13] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[21:17:13] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[21:17:13] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[21:17:13] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[21:17:13] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[21:17:13] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[21:17:13] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[21:17:13] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[21:17:13] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[21:17:13] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
can you please tell me what does it mean?
Re: [REL] MySQL Plugin (Now on github!) -
maddinat0r - 24.01.2014
You are somewhere using "cache_get_field_content(_int/_float)" with a wrong row index (the first parameter).
Re: [REL] MySQL Plugin (Now on github!) - HuSs3n - 24.01.2014
oh, you are right, thanks
Re: [REL] MySQL Plugin (Now on github!) -
audriuxxx - 25.01.2014
I download the latest plugin, and now when i downloaded it, i see 3 three plugins, mysql.so, mysql_5.5.so, mysql_static.so . Which is newest?
AW: Re: [REL] MySQL Plugin (Now on github!) -
Mellnik - 25.01.2014
Quote:
Originally Posted by audriuxxx
I download the latest plugin, and now when i downloaded it, i see 3 three plugins, mysql.so, mysql_5.5.so, mysql_static.so . Which is newest?
|
They are all the same version. It depends on what mysql server version you have installed. For 5.5 try mysql_5.5.so. Otherwise mysql.so or mysql_static.so.
Re : [REL] MySQL Plugin (Now on github!) -
anou1 - 25.01.2014
Hi,
Is this a bug ?
Код:
cache_get_field_content(0, "RaisonBan", pInfo[playerid][RaisonBan], mysql, 129);
printf("%s", pInfo[playerid][RaisonBan]);
pInfo[playerid][ID] = cache_get_row_int(0, 0);
pInfo[playerid][Admin] = cache_get_row_int(0, 5);
pInfo[playerid][VIP] = cache_get_row_int(0, 6);
pInfo[playerid][Argent] = cache_get_row_int(0, 7);
pInfo[playerid][posX] = cache_get_row_float(0, 8);
pInfo[playerid][posY] = cache_get_row_float(0, 9);
pInfo[playerid][posZ] = cache_get_row_float(0, 10);
pInfo[playerid][Interieur] = cache_get_row_int(0, 11);
pInfo[playerid][World] = cache_get_row_int(0, 12);
pInfo[playerid][Skin] = cache_get_row_int(0, 13);
pInfo[playerid][Niveau] = cache_get_row_int(0, 14);
pInfo[playerid][Bannis] = cache_get_row_int(0, 16);
pInfo[playerid][Vie] = cache_get_row_float(0, 18);
pInfo[playerid][Armure] = cache_get_row_float(0, 19);
printf("%s", pInfo[playerid][RaisonBan]);
For the first printf it shows me the realy reason "vrabrohrvraoq"
But for the second printf, I don't know why, it only shows the first letter of the reason and it shows "v".
Do you know why and how could I solve this ?
Re: [REL] MySQL Plugin (Now on github!) -
maddinat0r - 25.01.2014
Are you sure this is the complete code you posted? There is absolutely no way the cache_get_row_* natives could affect any other variables.
Re : [REL] MySQL Plugin (Now on github!) -
anou1 - 25.01.2014
Here's my code:
http://pastebin.com/KJXZ9W3h
Re: [REL] MySQL Plugin (Now on github!) -
maddinat0r - 25.01.2014
That "RaisonBan" enum entry isn't declared as an array, so your problem is in line 105.
Re : [REL] MySQL Plugin (Now on github!) -
anou1 - 25.01.2014
Thank you, I'm gonna try to solve this.
But have you an idea of this:
for the first printf, it shows the reason
but for the second it doesn't shows the reason exept the first letter of the reason.
Thank you
Re: [REL] MySQL Plugin (Now on github!) -
maddinat0r - 25.01.2014
It's like that because the ban reason is the first thing you assign to your player enum array. At that time the enum-array is empty and the ban reason string overwrites memory. After printing the ban reason for the first time, you assign all other values to your enum-array, thus overwriting the ban reason string with those values,
except for one char, because you still have that "BanRaison" enum-entry there.
Re : [REL] MySQL Plugin (Now on github!) -
anou1 - 25.01.2014
Thank you for the explanations and sorry for the PM.
Re: [REL] MySQL Plugin (Now on github!) -
Misiur - 26.01.2014
I'm looking into COrm.cpp - would it be possible to change SVarInfo struct "name" field after adding it? Either by introducing orm_removevar, or orm_renamevar? I'm thinking about joined queries (using orm_apply_cache), where field names have prefixes, but later on they don't need one for updating.
Re: [REL] MySQL Plugin (Now on github!) -
RedCrossER - 27.01.2014
it will be good if you add func to cancel scheduled queries with some id or something.
Re: [REL] MySQL Plugin (Now on github!) -
maddinat0r - 27.01.2014
Quote:
Originally Posted by Misiur
I'm looking into COrm.cpp - would it be possible to change SVarInfo struct "name" field after adding it? Either by introducing orm_removevar, or orm_renamevar? I'm thinking about joined queries (using orm_apply_cache), where field names have prefixes, but later on they don't need one for updating.
|
Here you go:
https://github.com/pBlueG/SA-MP-MySQ...8199286f85f5bf
Quote:
Originally Posted by RedCrossER
it will be good if you add func to cancel scheduled queries with some id or something.
|
This would be very hard to implement and wouldn't make any sense. Do you seriously think you can cancel a query fast enough before it is executed? We're talking about milliseconds here.
Re: [REL] MySQL Plugin (Now on github!) -
Misiur - 27.01.2014
You rock!
Re: [REL] MySQL Plugin (Now on github!) -
TopFuel - 28.01.2014
I do not know if it has already been suggested or if it is possible but I would like a function that checks if the plugin is connected to the server.
like:
pawn Код:
native mysql_isconnected(connectionHandle = 1);
Re: [REL] MySQL Plugin (Now on github!) -
maddinat0r - 28.01.2014
Quote:
Originally Posted by Top Fuel
I do not know if it has already been suggested or if it is possible but I would like a function that checks if the plugin is connected to the server.
like:
pawn Код:
native mysql_isconnected(connectionHandle = 1);
|
You have to assume that it is connected. If it isn't, the internal automated reconnect mechanism will be started (unless you deactivate it in mysql_connect and as long as it's a threaded query). For unthreaded functions like mysql_query or mysql_escape_string you'll need to check with mysql_errno.