|
SoeH
|
 |
« Reply #930 on: November 03, 2009, 04:52:29 am » |
|
I have this problem... I'm using this function and my server crash. What can i do?
|
|
|
|
|
Logged
|
|
|
|
|
MenaceX^
|
 |
« Reply #931 on: November 03, 2009, 05:14:58 am » |
|
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
|
 |
« 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
|
 |
« 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
|
 |
« 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
|
 |
« 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
|
 |
« Reply #936 on: November 04, 2009, 11:26:14 am » |
|
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?
|
|
|
|
|
Logged
|
My releases
|
|
|
|
MenaceX^
|
 |
« Reply #937 on: November 04, 2009, 11:55:19 am » |
|
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: while(samp_mysql_fetch_row(resultline)) { }
|
|
|
|
|
Logged
|
 You may PM me with filter scripts suggestions and I will maybe make it.
|
|
|
|
Redgie
|
 |
« 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: while(samp_mysql_fetch_row(resultline)) { } 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: samp_mysql_query(query); samp_mysql_store_result(); samp_mysql_fetch_row(result); right?
|
|
|
|
|
Logged
|
My releases
|
|
|
|
SoeH
|
 |
« 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
|
 |
« Reply #940 on: November 05, 2009, 10:31:15 am » |
|
is this plugin bugged or...?
|
|
|
|
|
Logged
|
|
|
|
|
MenaceX^
|
 |
« 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
|
 |
« Reply #942 on: November 08, 2009, 03:48:25 am » |
|
So already there is a decision with server crash? 
|
|
|
|
|
Logged
|
|
|
|
|
Hypar
|
 |
« 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
|
if(strcmp(cmd,"/getcar",true) == 0) { return CarToPlayer(playerid); }  
|
|
|
|
MenaceX^
|
 |
« 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.
|
|
|
|