SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 02/06/2010, 03:36 PM   #361
BlueRey
Big Clucker
 
BlueRey's Avatar
 
Join Date: Mar 2009
Location: Israel
Posts: 114
Reputation: 10
Default Re: [REL] SA:MP MySQL Plugin 1.2.1 - New Update Released

Quote:
Originally Posted by BlueRey
Quote:
Originally Posted by BlueRey
Quote:
Originally Posted by Coicatak
Quote:
Originally Posted by BlueRey
Quote:
[14:32:59] Server Plugins
[14:32:59] --------------
[14:32:59] Loading plugin: streamer.so
[14:32:59]
*** Streamer Plugin v2.3.7 by Incognito loaded ***

[14:32:59] Loaded.
[14:32:59] Loading plugin: mysql.so
[14:32:59] Failed (/usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by plugins/mysql.so))
[14:32:59] Loaded 1 plugins.

Re-download, you may don't have the last version of the plugin. Also make sure you have the right include and compiled your script at least once with it.
same fucking problem!
Quote:
----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3a R6, (C)2005-2010 SA-MP Team

[03:45:42]
[03:45:42] Server Plugins
[03:45:42] --------------
[03:45:42] Loading plugin: streamer.so
[03:45:42]
*** Streamer Plugin v2.3.7 by Incognito loaded ***

[03:45:42] Loaded.
[03:45:42] Loading plugin: mysql.so
[03:45:42] Failed (/usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by plugins/mysql.so))
[03:45:42] Loaded 1 plugins.

[03:45:43]
[03:45:43] Filter Scripts
[03:45:43] ---------------
[03:45:43] Loading filter script 'rcon-cmds.amx'...
[03:45:43] Loaded 1 filter scripts.

[03:45:43] Script[gamemodes/test.amx]: Run time error 19: "File or function is not found"
[03:45:43] Number of vehicle models: 0
BlueRey is offline   Reply With Quote
Old 02/06/2010, 07:20 PM   #362
DX7
Little Clucker
 
Join Date: Apr 2010
Posts: 7
Reputation: 0
Default Re: [REL] SA:MP MySQL Plugin 1.2.1 - New Update Released

I've got an issue.

I've got one part loading Businesses from the MySQL Database, however there's a problem when I try to load the business name.

Basically in the mysql log, it fetches the name of the business perfectly fine as "Club Vice", however when it creates the 3D Text Label it misses out the C, and this also happens to the entire bName variable.

So for example; the 3D Text Label displays as "lub Vice", as well as other strings using bName such as "Welcome to lub Vice", when it should be Club Vice.

Any ideas?
DX7 is offline   Reply With Quote
Old 03/06/2010, 07:12 AM   #363
ziomal432
Big Clucker
 
Join Date: Dec 2009
Posts: 121
Reputation: 0
Default Re: [REL] SA:MP MySQL Plugin 1.2.1 - New Update Released

Little idea:
query handles
ziomal432 is offline   Reply With Quote
Old 06/06/2010, 02:59 PM   #364
Janson_GH
Little Clucker
 
Join Date: Oct 2009
Posts: 5
Reputation: 0
Default Re: [REL] SA:MP MySQL Plugin 1.2.1 - New Update Released

hey guys, I have a question about this plugin, if there are many users on the server and the server have to do many mysql things and the mysql_free_result function happens in one function but in the other function the there are things working with other results will the server clear ALL results??
Janson_GH is offline   Reply With Quote
Old 07/06/2010, 06:38 PM   #365
Logitech334
Little Clucker
 
Join Date: Jul 2008
Posts: 31
Reputation: 0
Default Re: [REL] SA:MP MySQL Plugin 1.2.1 - New Update Released

hey guys. I have one question.

mysql_free_result(); works on all result or result in hmm. eg. command?

I paste my example command, ask me wheter it is good?

Code:
#define mysql_fetch_field_row(%1,%2) mysql_fetch_field(%2,%1) // This is my macro.

Cmd::Input->v(playerid, cmdtext[])
{
  #pragma unused cmdtext
  new send[128], data[256];
  new 
      uid,
      model,
 	  showdialog[512],
 	  spawntext[2][6] = {
 	  "no", "yes" },
	  check[64];
 
	format(send, sizeof(send), "SELECT `id`, `model_id` FROM `car_info` WHERE `owner_id` = '%d'", Players[playerid][player_uid]);
	send_query(send);
	db::store_result();
	if(db::fetch_row(check) == 0)
	{
		GameTextForPlayer(playerid, "~r~None ~w~vehicles", 4000, 5);
		return 1;
	}
 	while(mysql_fetch_row_data())
 	{
  		db::fetch_field_row(data,"id");
   	uid = strval(data);
  	db::fetch_field_row(data,"model_id");
  	model = strval(data);
  	format(showdialog, sizeof(showdialog), "%s%d\t\t%s(%d)\t%s\n", showdialog, uid, PlayerVehicle[model-=400], model, spawntext[Car[uid][aSpawn]]);
  }
  db::free_result();
	Dialog::Output(playerid,21,DIALOG_STYLE_LIST,"Vehicle",showdialog,"(Un)Spawn","Zamknij");
	GameTextForPlayer(playerid, "~n~~n~~n~~n~wpisz ~y~/vz ~w~aby zarzadzac pojazdami", 5000, 5);
	return 1;
}
Logitech334 is offline   Reply With Quote
Old 07/06/2010, 07:21 PM   #366
Balon
Big Clucker
 
Join Date: Oct 2007
Posts: 108
Reputation: 2
Default Re: [REL] SA:MP MySQL Plugin 1.2.1 - New Update Released

mysql_free_result is used for freeing the memory allocated by mysql_store_result. So.. answer to yourself.
Balon is offline   Reply With Quote
Old 09/06/2010, 10:22 AM   #367
Chaprnks
Gangsta
 
Chaprnks's Avatar
 
Join Date: Sep 2007
Location: Soviet America
Posts: 596
Reputation: 69
Default Re: [REL] SA:MP MySQL Plugin 1.2.1 - New Update Released

Quote:
Originally Posted by Mlody626
My server on the windows plugin works correctly but when i try to give it to the remote server with linux (I use linux plugin of course) it seems that the plugin does not work properly. Plugin bad reads data from the database and crash server after a while.

Does anyone know what might be the cause? Maybe something is wrong with the plugin for linux?

Please help because this mysql plugin is the best and I would like to use it. Sorry for my bad English (I used Translator)
Been having the same exact problem. Everything works fine in windows (excluding mysql_fetch_int which crashes o_O), but in linux, it won't even load.
__________________
Chaprnks is online now   Reply With Quote
Old 05/07/2010, 04:02 PM   #368
selEcT
Big Clucker
 
Join Date: Jan 2010
Posts: 50
Reputation: 2
Default Re: [REL] SA:MP MySQL Plugin 1.2.1 - New Update Released

hi guys,

I've got a problem (linux debian 5.0):

When I want to log in, I can put in the password and then the server crashes. In the script, it's this part for the login:


format(query, sizeof(query), "SELECT * FROM user WHERE ID = %d LIMIT 1", PlayerInfo[playerid][pSQLID]);
mysql_query(query);
mysql_store_result();
//here it crashes!! (mysql_fetch_field("Password",data)), but the password field exists!
if(mysql_fetch_field("Password", data))
{
//doesn't display in the server monitor!!
printf("Data: %s, Password: %s",data,MD5_Hash(password));
if(!strcmp(data,MD5_Hash(password),false))
{

can anyone help me? ^^

Last edited by selEcT; 05/07/2010 at 07:27 PM.
selEcT is offline   Reply With Quote
Old 06/07/2010, 09:38 PM   #369
Luka P.
High-roller
 
Join Date: Feb 2009
Posts: 1,428
Reputation: 13
Default Re: [REL] SA:MP MySQL Plugin 1.2.1 - New Update Released

How to check does row in the table exists? I mean like to check does specific username is registred.

EDIT: I made my own code
pawn Code:
new query[128], buffer[128];
   CreateNameVariable(playerid, pName);
   
   format(query, sizeof(query), "SELECT * FROM Accounts WHERE Name = '%s'", pName);
   mysql_query(query);
   
   mysql_store_result();
   
   if(mysql_fetch_row(buffer, _, base)) printf("exists");
   else printf("doesn't exists");
   
   mysql_free_result();

Please post any suggestions regarding that code, I'm newb in this.

Last edited by Luka P.; 06/07/2010 at 10:24 PM. Reason: Success
Luka P. is offline   Reply With Quote
Old 06/07/2010, 11:06 PM   #370
R3SP3CT
Little Clucker
 
Join Date: Jan 2009
Posts: 2
Reputation: 0
Default Re: [REL] SA:MP MySQL Plugin 1.2.1 - New Update Released

I have a question!

Recently the host of my server suffered an OS update for Windows Server 2008 R2, and the mysql plugin Failed.

What causes this?
It is necessary to recompile the plugin for x64 in OS identical?

log:
[01:07:40] Server Plugins
[01:07:40] --------------

[01:07:40] Loading plugin: mysql
[01:07:40] Failed.

[01:07:40] Script[gamemodes/duelos8.amx]: Run time error 19: "File or function is not found"
R3SP3CT is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Plugin] [REL] MySQL Plugin (Now on github!) BlueG Plugin Development 6158 11/04/2020 08:51 AM
Best MySQL Plugin? Antonio [G-RP] Help Archive 3 10/01/2011 01:31 AM
Best MySQL plugin? DRIFT_HUNTER Help Archive 2 07/12/2010 03:43 PM
Which MySQL plugin? Whois. Help Archive 0 07/04/2010 11:55 AM
Mysql Plugin Help Jbosh123 Help Archive 0 04/09/2009 11:35 AM


All times are GMT. The time now is 12:49 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.