[Plugin] [REL] SA:MP MySQL Plugin 2.1.1 - Released (1/25/2011

kk i downloaded 2008 and compiled it and: the server crashs after a few rows

also there were some rows like this:
Код:
Function: mysql_fetch_row executed with result: "xIxI4|596|1|1|1601.51|-1704.37|5.5604|88.3521|154|1|80|1000|0|5|LS".


//after a recompile of the same project, it runs o.O
Reply

I have upgrade mysql include from v 0.1 to 2.1.1 and i replace all function from samp_mysql_.... to mysql_...

When i run server and see in SA-MP Client the mode text is " Unknow " and server don't read txt files.

How to fix ?

Sorry for very bad English
Reply

sure the correct plugin?
samp_mysql_ sounds like the plugin of ADreNaLiNe-DJ (https://sampforum.blast.hk/showthread.php?tid=7106)

you cant use this plugin with the functions of another plugin
Reply

Oh

Wrong plugins !? XD

But i try to use other script it have StrickenKid plugins old version and complied with INC 2.1.1 and have same promblem.
Код:
[Mon Mar 21 13:17:39 2011] -------------------------
[Mon Mar 21 13:17:39 2011]      Logging Started
[Mon Mar 21 13:17:39 2011] -------------------------
[Mon Mar 21 13:17:39 2011] Function: mysql_init executed with result: "0".
[Mon Mar 21 13:17:39 2011] Connected (0) to root @ localhost via TCP/IP.
[Mon Mar 21 13:17:39 2011] MySQL Server Version 5.1.54-community.
[Mon Mar 21 13:17:39 2011] Function: mysql_set_character_set executed with result: "0".
how to fix this promblem ?
Reply

sry but i cant see any errors

what if you put an query after mysql_set_character_set? will it executed? are there any errors in the logs?
Reply

You might be getting errors and logs mixed up, that file is logging events performed by the mysql plugin.

Its actually showing that it has successfully connected with no errors.

If the line starts with "Error", then its an error.
Reply

Why this command doesn't works at this plugin?
http://pastebin.com/nYQbqeyv

It freezes at new pdata[122][64];

But this one that is almost in the same format does works:
http://pastebin.com/Sm215yLQ

It works perfectly on others plugins though. Please help me.
(PS: I am using CityWide RP)
Reply

are there any errors?

hmm u wrote that u are using citywide, isnt there a support thread where someone has the same problem?

when it runs with other plugins, why do u want to change it? i think ur gamemode is made for using an other plugin, nor?
Reply

Quote:
Originally Posted by Akmet
Посмотреть сообщение
are there any errors?

hmm u wrote that u are using citywide, isnt there a support thread where someone has the same problem?

when it runs with other plugins, why do u want to change it? i think ur gamemode is made for using an other plugin, nor?
No errors shows up.
I guess not.
I changed it because my host is not accepting the other plugin, it says something about glibcc detected and the server doesn't turn on.
I don't think so.

@
I noticed that the 'freezing' only occurs if I do something like:
new pdata[36][50];
But if I do something like:
new pdata[35][50];
It doesn't freezes.

@@
The command seems to freeze at another gamemode too. :/ Maybe it is something related to my database? I did this one just for testing.
http://i54.tinypic.com/9th5hi.jpg
Reply

and whats your problem with new pdata[35][50];?
i mean if it runs, why change something
Reply

I get this errors.

Код:
[Thu Mar 31 20:04:20 2011] Function: mysql_query executed: "INSERT INTO `user` (name, passwort, geld, bank, leader, member, admin, skin, job, drogen, payday, adminjail, jailzeit, geschlecht, levelpunkte, level) VALUES ('Verti4cal', '1F26EE2A8F542B49BB6C8A0637B4EECE', 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1);" with result: "1".
[Thu Mar 31 20:04:20 2011] Error (0): Failed to exeute query. Column count doesn't match value count at row 1.
Here is the Code:

Код:
new query[512];
format(query, sizeof(query), "INSERT INTO `user` (name, passwort, geld, bank, leader, member, admin, skin, job, drogen, payday, adminjail, jailzeit, geschlecht, levelpunkte, level) VALUES ('%s', '%s', %d, %d, 0, 0, 0, %d, 1, 0, 0, 0, 0, 0, %d, 0, 1);", Spielername(playerid), passwortx, Player[playerid][geld], Player[playerid][bank], Player[playerid][Skin], Player[playerid][Geschlecht]);
mysql_query(query);
mysql_store_result();
mysql_free_result();
Can anyone help me, please?

Edit
first Error fixed, but now it is another error
Reply

pawn Код:
new query[512];
format(query, sizeof(query), "INSERT INTO `user` (name, passwort, geld, bank, leader, member, admin, skin, job, drogen, payday, adminjail, jailzeit, geschlecht, levelpunkte, level) VALUES ('%s', '%s', %d, %d, 0, 0, 0, %d, 1, 0, 0, 0, 0, %d, 0, 1);", Spielername(playerid), passwortx, Player[playerid][geld], Player[playerid][bank], Player[playerid][Skin], Player[playerid][Geschlecht]);
mysql_query(query);
mysql_store_result();
mysql_free_result();
Reply

I have a problem
after some amount of time that server is connected to mysql the connection is lost from it how can i fix this? before you said you forgot to add a reconnecter or idk what please help me thanks.
Reply

Quote:
Originally Posted by [Ask]Terminator
Посмотреть сообщение
I have a problem
after some amount of time that server is connected to mysql the connection is lost from it how can i fix this? before you said you forgot to add a reconnecter or idk what please help me thanks.
It could be your code causing that.
Reply

no already asked but he said that he had forgot to add the reconnecter now i want to see how to add the reconnecter
Reply

#
# native mysql_connect(const host[], const user[], const pass[], const db[], MySQL:handle = (MySQL:0), auto_reconnect = 0);

just set the last value to 1 or true
Reply

I get warning tag mistache !
Reply

pfff this is **** nobody answer...
Reply

Great Work, also thanks for fixing the mysql_close issues
Reply

How to run plugin with other socket directory?
I have here socket on server: /var/run/mysqld/mysqld.sock

Quote:

[Tue Apr 26 18:50:28 2011] Error (0): Failed to connect. Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2).

Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)