SA-MP Forum
November 21, 2009, 12:27:17 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Hosted tab listings available from serverFFS
 
   Home   Help Login Register  
Pages: 1 ... 61 62 [63] 64 65
  Print  
Author Topic: [REL]SAMP-MySQL v0.15 - SAMP 0.3 supported!!! corrected version uploaded...  (Read 93342 times)
SoeH
Big Clucker
**
Posts: 74



View Profile WWW
« Reply #930 on: November 03, 2009, 04:52:29 am »

I've tested my function with your old version but, i get the same problem as before undecided

Related : http://forum.sa-mp.com/index.php?topic=23931.msg787099#msg787099

I cannot use my function twice  Sad
Server crash at
Code:
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?
Logged

MenaceX^
High-roller
*****
Posts: 4137


View Profile
« Reply #931 on: November 03, 2009, 05:14:58 am »

I've tested my function with your old version but, i get the same problem as before undecided

Related : http://forum.sa-mp.com/index.php?topic=23931.msg787099#msg787099

I cannot use my function twice  Sad
Server crash at
Code:
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..
Logged


You may PM me with filter scripts suggestions and I will maybe make it.
SoeH
Big Clucker
**
Posts: 74



View Profile WWW
« Reply #932 on: November 03, 2009, 05:26:51 am »

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.)
Logged

SE7ENGX
Little Clucker
*
Posts: 1


View Profile
« Reply #933 on: November 03, 2009, 10:41:15 am »

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?
Logged
Joe Staff
High-roller
*****
Posts: 1146



View Profile
« Reply #934 on: November 03, 2009, 11:11:36 am »

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();
Logged


Click on the picture to see more of my work.
mprofitt
Big Clucker
**
Posts: 54


View Profile
« Reply #935 on: November 03, 2009, 11:32:44 am »

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();
Logged
Redgie
Gangsta
****
Posts: 519


View Profile WWW
« Reply #936 on: November 04, 2009, 11:26:14 am »

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

Code:
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?
Logged


My releases
MenaceX^
High-roller
*****
Posts: 4137


View Profile
« Reply #937 on: November 04, 2009, 11:55:19 am »

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

Code:
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 Code:
while(samp_mysql_fetch_row(resultline))
{
    // the strtok stuff.
}
Logged


You may PM me with filter scripts suggestions and I will maybe make it.
Redgie
Gangsta
****
Posts: 519


View Profile WWW
« Reply #938 on: November 04, 2009, 03:15:02 pm »

I suppose you forgot samp_mysql_fetch_row, and I'd rather do this that way:
PAWN Code:
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 Code:
samp_mysql_query(query);
samp_mysql_store_result();
samp_mysql_fetch_row(result);
right?
Logged


My releases
SoeH
Big Clucker
**
Posts: 74



View Profile WWW
« Reply #939 on: November 05, 2009, 08:46:56 am »

[17:34:01] Error in mysql_query: Commands out of sync; you can't run this command now

What is this?
Logged

Imran
Little Clucker
*
Posts: 45


View Profile
« Reply #940 on: November 05, 2009, 10:31:15 am »

is this plugin bugged or...?
Logged
MenaceX^
High-roller
*****
Posts: 4137


View Profile
« Reply #941 on: November 05, 2009, 11:14:28 am »

Both plugins are bugged..
Logged


You may PM me with filter scripts suggestions and I will maybe make it.
PawnNewCommer
Little Clucker
*
Posts: 17


View Profile
« Reply #942 on: November 08, 2009, 03:48:25 am »

So already there is a decision with server crash?  Sad
Logged
Hypar
Gangsta
****
Posts: 582



View Profile WWW
« Reply #943 on: November 09, 2009, 10:07:29 am »

So what is this plugin for? There are already build in sql features in sa-mp.. Also, isn't there an include instead of a plugin? My host doesnt allow me to dump all those files in the root..
Logged

PAWN Code:
if(strcmp(cmd,"/getcar",true) == 0)
{
    return CarToPlayer(playerid);
}
MenaceX^
High-roller
*****
Posts: 4137


View Profile
« Reply #944 on: November 09, 2009, 10:15:03 am »

So what is this plugin for? There are already build in sql features in sa-mp.. Also, isn't there an include instead of a plugin? My host doesnt allow me to dump all those files in the root..
The include is SQLite, this is not.
Logged


You may PM me with filter scripts suggestions and I will maybe make it.
Pages: 1 ... 61 62 [63] 64 65
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF one | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!