Posts: 230
Threads: 95
Joined: Jun 2011
Reputation:
0
Im experiencing big problems with MySQL and OnPlayerConnect function. I'm using R33 plugin on CentOS 6.4 (32bit) machine with (5.5.34 - MySQL Community Server (GPL) by Remi).
My problem is when i have +30 players my OnPlayerConnect is not calling when someone joins on the server. For the first 30 IDs its working perfectly... For those players which OnPlayerConnect isn't called, MySQL cant check their accounts and load them... Also i don't have any errors in server.log and mysql.log
Where is the problem and what code should i post ?
I think there is nothing wrong with my code because its working perfect when there are 25-30 players... The server messes up when there are +30 players... HELP !!!
Posts: 845
Threads: 3
Joined: Jun 2010
Quote:
Originally Posted by NeroX98
Im experiencing big problems with MySQL and OnPlayerConnect function. I'm using R33 plugin on CentOS 6.4 (32bit) machine with (5.5.34 - MySQL Community Server (GPL) by Remi).
My problem is when i have +30 players my OnPlayerConnect is not calling when someone joins on the server. For the first 30 IDs its working perfectly... For those players which OnPlayerConnect isn't called, MySQL cant check their accounts and load them... Also i don't have any errors in server.log and mysql.log
Where is the problem and what code should i post ?
I think there is nothing wrong with my code because its working perfect when there are 25-30 players... The server messes up when there are +30 players... HELP !!!
|
Can you try different plugin versions, first R34, then R31 (and if you can also R20)?
Posts: 230
Threads: 95
Joined: Jun 2011
Reputation:
0
Ok It's same... Now i added prints so i saw that onplayerconnect is called, but stops before to load the account with mysql... it stops between the variables when i set them to 0... so can be this related to mysql (because before mysql worked perfectly)... ?
Posts: 845
Threads: 3
Joined: Jun 2010
Quote:
Originally Posted by NeroX98
Ok It's same... Now i added prints so i saw that onplayerconnect is called, but stops before to load the account with mysql... it stops between the variables when i set them to 0... so can be this related to mysql (because before mysql worked perfectly)... ?
|
Can you post the code where it stops?
Posts: 28
Threads: 10
Joined: Jun 2013
Reputation:
0
YOU ARE AWESOME BlueG !!!
Posts: 845
Threads: 3
Joined: Jun 2010
Quote:
Originally Posted by NeroX98
Here is my whole OnPlayerConnect:
http://pastebin.com/Rwh5BEcX (Maybe it looks big, but it isn't, textdraws and variables are making it bigger )
pawn Код:
printf("Igrac %d vleze", playerid); // This is called when there are 30+ players... But after this nothing is readed/loaded... printf("Igrac %d se mu e na 0", playerid); // this is not printed after 30+ players.
So the problem is between the first and second printf function... (There are RemoveBuildingForPlayer functions, Textdraw creations, Checkin name and his properties and setting variables to default (0)... Under the second printf is MySQL (see pastebin).
Please help man, PLEASE !
|
Then comment the code between those 2 printf's out and see if it works. If yes, start partially uncommenting the code again until it doesn't work again. By that time it should be clear what isn't working.
Posts: 1,113
Threads: 127
Joined: Jul 2008
Reputation:
0
Thats not seem to be the problem. Just tried it.
Posts: 845
Threads: 3
Joined: Jun 2010
Quote:
Originally Posted by dusk
Thats not seem to be the problem. Just tried it.
|
Try the IP instead of the hostname ("127.0.0.1" instead of "localhost").
Posts: 845
Threads: 3
Joined: Jun 2010
Quote:
Originally Posted by dusk
Nop, the error changes accordingly
pawn Код:
(error #2003) Can't connect to MySQL server on '127.0.0.1' (10061)
|
Then you maybe didn't updated the libmysql.dll.
Posts: 845
Threads: 3
Joined: Jun 2010
Quote:
Originally Posted by dusk
I re-downloaded it and put it in my server directory. Same error :/
|
Well, then it should be clear that the problem likely isn't the plugin. Maybe you have to do some additional configurations.
Posts: 79
Threads: 2
Joined: Jun 2009
Reputation:
0
I have question: how to make function like GetPlayerInt(playerid, field[]) using cache? I don't want to create functions to all my queries.
Posts: 162
Threads: 4
Joined: Aug 2011
Reputation:
0
Hi, I've got few questions regarding the latest release (r34)
1) What's the difference between mysql_query & mysql_tquery
2) How to ping database? There is no mysql_ping
3) Is mysql_query threaded?
Thanks.