[Plugin] [REL]SAMP-MySQL v0.15 - SAMP 0.3 supported!!! corrected version uploaded...
#81

Quote:
Originally Posted by MenaceX^
Awesome, thanks a lot.
Np :]
Reply
#82

Quote:
Originally Posted by Dedepc
I've tested my function with your old version but, i get the same problem as before

Related : http://forum.sa-mp.com/index.php?top...7099#msg787099

I cannot use my function twice
Server crash at
Код:
samp_mysql_fetch_row(ligne_brute);
samp_mysql_get_field(info, ligne_resultat);
Like the others one ...
I have this problem...
I'm using this function and my server crash.

What can i do?
Reply
#83

Quote:
Originally Posted by SoeH
Quote:
Originally Posted by Dedepc
I've tested my function with your old version but, i get the same problem as before

Related : http://forum.sa-mp.com/index.php?top...7099#msg787099

I cannot use my function twice
Server crash at
Код:
samp_mysql_fetch_row(ligne_brute);
samp_mysql_get_field(info, ligne_resultat);
Like the others one ...
I have this problem...
I'm using this function and my server crash.

What can i do?
Can't you read? This plugin is bugged..
Reply
#84

Yes, I can.

[REL]SAMP-MySQL v0.15 - SAMP 0.3 supported!!! corrected version uploaded...

Are there any plugin developer that can resolve this problem?
More people use this plugin, but also when you have more variables there are a crash probability, i think that it is fixable...

EDIT: (I talk about Windows v.)
Reply
#85

I've been playing with this for the last couple days but it seems the plugin crashes my server. Windows Server 2003, and also tried on XP SP3. I have mysql knowledge but apparently there wasn't anything that went wrong. SAMP Server simply just closed after a successful connection and query attempt. MySQL 5.1, apache... any ideas?
Reply
#86

Quote:
Originally Posted by SE7ENGX
I've been playing with this for the last couple days but it seems the plugin crashes my server. Windows Server 2003, and also tried on XP SP3. I have mysql knowledge but apparently there wasn't anything that went wrong. SAMP Server simply just closed after a successful connection and query attempt. MySQL 5.1, apache... any ideas?
Make sure you're using mysql_store_result();
Reply
#87

Quote:
Originally Posted by Joe Staff
Quote:
Originally Posted by SE7ENGX
I've been playing with this for the last couple days but it seems the plugin crashes my server. Windows Server 2003, and also tried on XP SP3. I have mysql knowledge but apparently there wasn't anything that went wrong. SAMP Server simply just closed after a successful connection and query attempt. MySQL 5.1, apache... any ideas?
Make sure you're using mysql_store_result();
I am crashing as well.
Yes I am using mysql_store_result();
Reply
#88

Quick Question, here is some code I use, cut down and simplified

Код:
while (idx < sizeof(HouseInfo))
{
  new query[128],result[256],loop[256];
  new poop = 1;
  format(query,sizeof(query),"SELECT * FROM Houses WHERE ID = '%d'",idx);
  samp_mysql_query(query);
  samp_mysql_store_result();
  samp_mysql_fetch_row(result);
  if(samp_mysql_num_rows() == 1)
  {
    samp_mysql_strtok(loop, "|", result);
    while(samp_mysql_strtok(loop, "|", ""))
    {
      //Do stuff
      poop++;
    }
    idx++;
  }
}
My question is, because "idx++;" is only called "if(samp_mysql_num_rows() == 1)", will the loop continue endlessly once "samp_mysql_num_rows() != 1" because "idx++;" is never being used?
Reply
#89

Quote:
Originally Posted by Redgie
Quick Question, here is some code I use, cut down and simplified

Код:
while (idx < sizeof(HouseInfo))
{
  new query[128],result[256],loop[256];
  new poop = 1;
  format(query,sizeof(query),"SELECT * FROM Houses WHERE ID = '%d'",idx);
  samp_mysql_query(query);
  samp_mysql_store_result();
  samp_mysql_fetch_row(result);
  if(samp_mysql_num_rows() == 1)
  {
    samp_mysql_strtok(loop, "|", result);
    while(samp_mysql_strtok(loop, "|", ""))
    {
      //Do stuff
      poop++;
    }
    idx++;
  }
}
My question is, because "idx++;" is only called "if(samp_mysql_num_rows() == 1)", will the loop continue endlessly once "samp_mysql_num_rows() != 1" because "idx++;" is never being used?
I suppose you forgot samp_mysql_fetch_row, and I'd rather do this that way:
pawn Код:
while(samp_mysql_fetch_row(resultline))
{
  // the strtok stuff.
}
Reply
#90

Quote:
Originally Posted by MenaceX^
I suppose you forgot samp_mysql_fetch_row, and I'd rather do this that way:
pawn Код:
while(samp_mysql_fetch_row(resultline))
{
  // the strtok stuff.
}
I didn't forget it, it is in there, I basically used the default query system back when I knew nothing about MySQL, and now I'm looking for reasons for heavy resource usage and am assuming a loop is going on longer than it should be, I'm going to log them to try to determine a cause but doesn't hurt to improve the coding too.

So the code you posted replaces the 3 MySQL lines:
pawn Код:
samp_mysql_query(query);
samp_mysql_store_result();
samp_mysql_fetch_row(result);
right?
Reply
#91

Hi,
iґve got a problem with my mysql login: I can only login one time if i disconnect and try to login again, the server crashes.

this is my code : http://pastebin.com/92ax3YYD

now i made this:



Код:
        format(query, sizeof(query), "SELECT * FROM `users` WHERE `name` = '%s'", pname2);
  	    print("after SELECT");
		samp_mysql_query(query);
		print("after query");
		samp_mysql_store_result();
		print("after store_result");
		samp_mysql_fetch_row(line);
		print("after fetch row");
and the last sentence in the Log is after store_result why does it crash at "fetch_row" ?
Reply
#92

Quote:
Originally Posted by Tirus
Hi,
iґve got a problem with my mysql login: I can only login one time if i disconnect and try to login again, the server crashes.

this is my code : http://pastebin.com/92ax3YYD

now i made this:



Код:
        format(query, sizeof(query), "SELECT * FROM `users` WHERE `name` = '%s'", pname2);
  	    print("after SELECT");
		samp_mysql_query(query);
		print("after query");
		samp_mysql_store_result();
		print("after store_result");
		samp_mysql_fetch_row(line);
		print("after fetch row");
and the last sentence in the Log is after store_result why does it crash at "fetch_row" ?
This plugin has a few bugs and it never gets fixed... I suggest you to change plugin until it gets updated or just stick to another one... Ethan's is the best one right now in my opinion.
Reply
#93

Quote:

samp_mysql_fetch_row(line);

What's "line" ?
Reply
#94

I have one Problem. I have a Linux Server with Debian etch. I start the server .. then in the server log can i read:
Код:
[16:00:19] Loading plugin: libmysqlclient.so
[16:00:19]  Failed (/lib/tls/libc.so.6: version `GLIBC_2.4' not found (required by plugins/libmysqlclient.so))
[16:00:19] Loaded 0 plugins.
Sorry for my bad englisch ^^

but what can i do?
Reply
#95

I'm not totally new to SQL and related things, but could anyone give me some examples what I could do with this?
Reply
#96

http://forum.sa-mp.com/index.php?topic=158587.msg943277 Doesn't use this plugin but you can try
Reply
#97

People this plugin hasn't been updated for 6 months and it's not even fully working. I suggest you to use any of the other two MySQL plugins.
Reply
#98

Maybe moderators can move this topic to some archives or delete it, then people don't ask here anything.
Reply
#99

I am use fuction samp_mysql_strtok

code...
pawn Код:
new gangmember[15][128];
            new Data[1024];
            new Field[64];
            new rcnt = 1;
            MySQLFetchGangRecord(PlayerInfo[playerid][pGID], Data);
            samp_mysql_strtok(Field, "|", Data);
            while (samp_mysql_strtok(Field, "|", "")==1)
            {
                if (rcnt == 7) gangmember[0] = strmid(gangmember[0], Field, 0, strlen(Field)-1, 255);
                if (rcnt == 8) gangmember[1] = strmid(gangmember[1], Field, 0, strlen(Field)-1, 255);
                if (rcnt == 9) gangmember[2] = strmid(gangmember[2], Field, 0, strlen(Field)-1, 255);
                if (rcnt == 10) gangmember[3] = strmid(gangmember[3], Field, 0, strlen(Field)-1, 255);
                if (rcnt == 11) gangmember[4] = strmid(gangmember[4], Field, 0, strlen(Field)-1, 255);
                if (rcnt == 12) gangmember[5] = strmid(gangmember[5], Field, 0, strlen(Field)-1, 255);
                if (rcnt == 13) gangmember[6] = strmid(gangmember[6], Field, 0, strlen(Field)-1, 255);
                if (rcnt == 14) gangmember[7] = strmid(gangmember[7], Field, 0, strlen(Field)-1, 255);
                if (rcnt == 15) gangmember[8] = strmid(gangmember[8], Field, 0, strlen(Field)-1, 255);
                if (rcnt == 16) gangmember[9] = strmid(gangmember[9], Field, 0, strlen(Field)-1, 255);
                if (rcnt == 17) gangmember[10] = strmid(gangmember[10], Field, 0, strlen(Field)-1, 255);
                if (rcnt == 18) gangmember[11] = strmid(gangmember[11], Field, 0, strlen(Field)-1, 255);
                if (rcnt == 19) gangmember[12] = strmid(gangmember[12], Field, 0, strlen(Field)-1, 255);
                if (rcnt == 20) gangmember[13] = strmid(gangmember[13], Field, 0, strlen(Field)-1, 255);
                if (rcnt == 21) gangmember[14] = strmid(gangmember[14], Field, 0, strlen(Field)-1, 255);
                rcnt++;
            }
Result...

Код:
D:\xxx\gamemodes\xxx.pwn(18590) : error 033: array must be indexed (variable "gangmember")
D:\xxx\gamemodes\xxx.pwn(18591) : error 033: array must be indexed (variable "gangmember")
D:\xxx\gamemodes\xxx.pwn(18592) : error 033: array must be indexed (variable "gangmember")
D:\xxx\gamemodes\xxx.pwn(18593) : error 033: array must be indexed (variable "gangmember")
D:\xxx\gamemodes\xxx.pwn(18594) : error 033: array must be indexed (variable "gangmember")
D:\xxx\gamemodes\xxx.pwn(18595) : error 033: array must be indexed (variable "gangmember")
D:\xxx\gamemodes\xxx.pwn(18596) : error 033: array must be indexed (variable "gangmember")
D:\xxx\gamemodes\xxx.pwn(18597) : error 033: array must be indexed (variable "gangmember")
D:\xxx\gamemodes\xxx.pwn(18598) : error 033: array must be indexed (variable "gangmember")
D:\xxx\gamemodes\xxx.pwn(18599) : error 033: array must be indexed (variable "gangmember")
D:\xxx\gamemodes\xxx.pwn(18600) : error 033: array must be indexed (variable "gangmember")
D:\xxx\gamemodes\xxx.pwn(18601) : error 033: array must be indexed (variable "gangmember")
D:\xxx\gamemodes\xxx.pwn(18602) : error 033: array must be indexed (variable "gangmember")
D:\xxx\gamemodes\xxx.pwn(18603) : error 033: array must be indexed (variable "gangmember")
D:\xxx\gamemodes\xxx.pwn(18604) : error 033: array must be indexed (variable "gangmember")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


15 Errors.
What is wrong?

Sorry i'm bad for english
Reply

I have a problem with excessive memory usage by the plugin. For example, when downloading a player statistics memory usage continues to grow, and after several hours by the server memory footprint is over 200 MB.

In this way, downloading the data:

[quote] new string [128];
new dest [256];

for (new x = 0, x <500, x + +) (

format (string, sizeof (string), "SELECT Pass FROM Players WHERE Nick = 'Mlody626'");
mysql_query (string);
mysql_store_result (ConID);
mysql_fetch_row_format (dest, "|");

print (dest);

)
[/ Quote]

I'm doing something wrong or something else we need to do to the memory consumption does not grow indefinitely?
Please help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)