26.08.2014, 20:15
[Plugin] [REL] MySQL Plugin (Now on github!)
01.09.2014, 16:23
Quote:
@Anou : To use cache functions in your code after a mysql_tquery, you MUST specify a callback in parameter of mysql_tquery.
Doing like this is the good way : pawn Код:
pawn Код:
|
01.09.2014, 16:25
02.09.2014, 08:54
@Patrick : inline functions can be accessed from a plugin, like public ones ?
@iFarbod : In any case, we'll have to create a public function, as specified in the wiki page of the plugin.
@iFarbod : In any case, we'll have to create a public function, as specified in the wiki page of the plugin.
02.09.2014, 09:54
Код:
SA-MP Dedicated Server ---------------------- v0.3z, ©2005-2014 SA-MP Team [02:50:51] [02:50:51] Server Plugins [02:50:51] -------------- [02:50:51] Loading plugin: streamer [02:50:51] *** Streamer Plugin v2.6.1 by Incognito loaded *** [02:50:51] Loaded. [02:50:51] Loading plugin: mysql [02:50:51] > MySQL plugin R5 successfully loaded. [02:50:51] Loaded. [02:50:51] Loading plugin: nativechecker [02:50:51] Loaded. [02:50:51] Loaded 3 plugins. [02:50:51] [02:50:51] Filterscripts [02:50:51] --------------- [02:50:51] Loaded 0 filterscripts. [02:50:51] Error: Function not registered: 'cache_get_data' [02:50:51] Error: Function not registered: 'cache_get_row' [02:50:51] Error: Function not registered: 'mysql_tquery' [02:50:51] Error: Function not registered: 'cache_get_row_int' [02:50:51] Error: Function not registered: 'cache_get_row_float' [02:50:51] Error: Function not registered: 'mysql_log' [02:50:51] Script[gamemodes/LFG.amx]: Run time error 19: "File or function is not found" [02:50:51] Number of vehicle models: 0
02.09.2014, 10:21
Quote:
SA-MP Dedicated Server
---------------------- v0.3z, ©2005-2014 SA-MP Team [02:50:51] [02:50:51] Server Plugins [02:50:51] -------------- [02:50:51] Loading plugin: streamer [02:50:51] *** Streamer Plugin v2.6.1 by Incognito loaded *** [02:50:51] Loaded. [02:50:51] Loading plugin: mysql [02:50:51] > MySQL plugin R5 successfully loaded. How to fix it ? |
http://files.g-stylezzz.com/mysql/re...-win32_vs9.rar Windows
02.09.2014, 10:39
Quote:
Код:
SA-MP Dedicated Server ---------------------- v0.3z, ©2005-2014 SA-MP Team [02:50:51] [02:50:51] Server Plugins [02:50:51] -------------- [02:50:51] Loading plugin: streamer [02:50:51] *** Streamer Plugin v2.6.1 by Incognito loaded *** [02:50:51] Loaded. [02:50:51] Loading plugin: mysql [02:50:51] > MySQL plugin R5 successfully loaded. [02:50:51] Loaded. [02:50:51] Loading plugin: nativechecker [02:50:51] Loaded. [02:50:51] Loaded 3 plugins. [02:50:51] [02:50:51] Filterscripts [02:50:51] --------------- [02:50:51] Loaded 0 filterscripts. [02:50:51] Error: Function not registered: 'cache_get_data' [02:50:51] Error: Function not registered: 'cache_get_row' [02:50:51] Error: Function not registered: 'mysql_tquery' [02:50:51] Error: Function not registered: 'cache_get_row_int' [02:50:51] Error: Function not registered: 'cache_get_row_float' [02:50:51] Error: Function not registered: 'mysql_log' [02:50:51] Script[gamemodes/LFG.amx]: Run time error 19: "File or function is not found" [02:50:51] Number of vehicle models: 0 |
Quote:
> MySQL plugin R5 successfully loaded. |
Quote:
update to R7 http://files.g-stylezzz.com/mysql/re...-win32_vs9.rar Windows |
https://github.com/pBlueG/SA-MP-MySQL/releases
Please DOWNLOAD R39-2!!!
02.09.2014, 12:03
----------
Loaded log file: "server_log.txt".
----------
SA-MP Dedicated Server
----------------------
v0.3z, ©2005-2014 SA-MP Team
[15:01:03] filterscripts = "" (string)
[15:01:03]
[15:01:03] Server Plugins
[15:01:03] --------------
[15:01:03] Loading plugin: mysql
[15:01:03] Failed.
[15:01:03] Loaded 0 plugins.
[15:01:03]
[15:01:03] Filterscripts
[15:01:03] ---------------
[15:01:03] Loaded 0 filterscripts.
[15:01:03] Script[gamemodes/slymind.amx]: Run time error 19: "File or function is not found"
[15:01:03] Number of vehicle models: 0
I've this problem, like other people. My mysql plugin is at last version, I downloaded which is posted laslty
Loaded log file: "server_log.txt".
----------
SA-MP Dedicated Server
----------------------
v0.3z, ©2005-2014 SA-MP Team
[15:01:03] filterscripts = "" (string)
[15:01:03]
[15:01:03] Server Plugins
[15:01:03] --------------
[15:01:03] Loading plugin: mysql
[15:01:03] Failed.
[15:01:03] Loaded 0 plugins.
[15:01:03]
[15:01:03] Filterscripts
[15:01:03] ---------------
[15:01:03] Loaded 0 filterscripts.
[15:01:03] Script[gamemodes/slymind.amx]: Run time error 19: "File or function is not found"
[15:01:03] Number of vehicle models: 0
I've this problem, like other people. My mysql plugin is at last version, I downloaded which is posted laslty
02.09.2014, 12:18
Quote:
----------
Loaded log file: "server_log.txt". ---------- SA-MP Dedicated Server ---------------------- v0.3z, ©2005-2014 SA-MP Team [15:01:03] filterscripts = "" (string) [15:01:03] [15:01:03] Server Plugins [15:01:03] -------------- [15:01:03] Loading plugin: mysql [15:01:03] Failed. [15:01:03] Loaded 0 plugins. [15:01:03] [15:01:03] Filterscripts [15:01:03] --------------- [15:01:03] Loaded 0 filterscripts. [15:01:03] Script[gamemodes/slymind.amx]: Run time error 19: "File or function is not found" [15:01:03] Number of vehicle models: 0 I've this problem, like other people. My mysql plugin is at last version, I downloaded which is posted laslty |
02.09.2014, 12:30
The nativechecker plugin won't help here, you probably just don't have the required C++ redistributables installed. Check the FAQ for a solution.
03.09.2014, 12:13
Quote:
The nativechecker plugin won't help here, you probably just don't have the required C++ redistributables installed. Check the FAQ for a solution.
|
I am really in need of help about that.
EDIT: by the way my operation system is windows 8, is there any problem with that?
03.09.2014, 12:37
No, there shouldn't be a problem.
Are you sure you installed the x86 redistributables (and not the x64 ones)? Did you place the libmysql.dll in the server directory?
Are you sure you installed the x86 redistributables (and not the x64 ones)? Did you place the libmysql.dll in the server directory?
03.09.2014, 17:31
How to use y_inline with the tqueries/pqueries ?
03.09.2014, 19:01
(
Последний раз редактировалось maddinat0r; 04.09.2014 в 15:45.
Причина: hurr durr
)
Код:
#include <YSI/y_inline> #include <a_mysql> //... inline Callback(number, Float:float) { printf("inline callback called! (number: %d, float: %f)", number, float); } mysql_tquery_inline(sql, "SELECT 1", using inline Callback, "df", 123, 456.7777);
04.09.2014, 12:40
Failed (libmysqlclient_r.so.16: cannot open shared object file: No such file or directory)
for centos6 pls help!
for centos6 pls help!
04.09.2014, 12:57
Quote:
Failed (libmysqlclient_r.so.16: cannot open shared object file: No such file or directory)
for centos6 pls help! |
Q: I get a Failed (libmysqlclient_r.so.16: cannot open shared object file: No such file or directory) error, how do I fix this?
A: You don't have the MySQL client library installed. Install the "mysql-client" package.
05.09.2014, 17:23
05.09.2014, 19:36
Are we allowe to use this plugin or we have to take perm from BlueG first?
05.09.2014, 19:51
what exactly are you asking good sir? are you asking if you can use it on a server...? then yes ok
06.09.2014, 16:06
Hi I wanna ask about my problem. I want load some my data with function mysql_tquery, but the callback doesn't called. Here's my code:
And here's the log: (from mysql_log.txt)
And this one from server_log.txt:
Sorry for my bad English
pawn Код:
public OnFilterScriptInit()
{
print( "> Connecting to MySQL server..." );
sqlconn = mysql_connect( "127.0.0.1", "root", "samp", "thepassistrue" );
ManualVehicleEngineAndLights();
mysql_tquery( sqlconn, "SELECT * FROM `prices`;", "CarPriceLoadInit" );
return 1;
}
forward CarPriceLoadInit();
public CarPriceLoadInit()
{
new tmp[16];
print("Loading Car Prices data.....");
for( new i = 0; i < cache_get_row_count( sqlconn ); i++ ) {
cache_get_field_content( i, "model", tmp, sqlconn ); VehInfo[i][Model] = strval(tmp);
cache_get_field_content( i, "type", tmp, sqlconn ); VehInfo[i][Type] = strval(tmp);
cache_get_field_content( i, "name", VehInfo[i][Name], sqlconn, 64 );
cache_get_field_content( i, "price", tmp, sqlconn ); VehInfo[i][Price][0] = strval(tmp);
}
printf("|- %d Car Prices loaded from database. -|", cache_get_row_count( sqlconn ));
return 1;
}
Код:
[23:01:24] [DEBUG] mysql_tquery - connection: 1, query: "SELECT * FROM `prices`;", callback: "CarPriceLoadInit", format: "(null)" [23:01:24] [DEBUG] CMySQLConnection::Connect - establishing connection to database... [23:01:24] [DEBUG] CMySQLConnection::Connect - establishing connection to database... [23:01:24] [DEBUG] CMySQLConnection::Connect - connection was successful [23:01:24] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled [23:01:24] [DEBUG] CMySQLConnection::Connect - connection was successful [23:01:24] [DEBUG] CMySQLConnection::Connect - connection was successful [23:01:24] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled [23:01:24] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled [23:01:24] [DEBUG] CMySQLQuery::Execute[CarPriceLoadInit] - starting query execution [23:01:24] [DEBUG] CMySQLQuery::Execute[CarPriceLoadInit] - query was successfully executed within 0.580 milliseconds [23:01:24] [DEBUG] CMySQLResult::CMySQLResult() - constructor called [23:01:24] [DEBUG] Calling callback "CarPriceLoadInit".. [23:01:24] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
Код:
---------- Loaded log file: "server_log.txt". ---------- SA-MP Dedicated Server ---------------------- v0.3z-R4, ©2005-2014 SA-MP Team [23:02:09] [23:02:09] Server Plugins [23:02:09] -------------- [23:02:09] Loading plugin: streamer [23:02:09] Loaded. [23:02:09] Loading plugin: sscanf [23:02:09] [23:02:09] =============================== [23:02:09] sscanf plugin loaded. [23:02:09] Version: 2.8.1 [23:02:09] © 2012 Alex "******" Cole [23:02:09] =============================== [23:02:09] Loaded. [23:02:09] Loading plugin: mysql [23:02:09] >> plugin.mysql: R39-2 successfully loaded. [23:02:09] Loaded. [23:02:09] Loaded 3 plugins. [23:02:09] [23:02:09] Filterscripts [23:02:09] --------------- [23:02:09] Loading filterscript 'ls_mall.amx'... [23:02:09] Loading filterscript 'ls_elevator.amx'... [23:02:09] Loading filterscript 'VehSys.amx'... [23:02:09] [23:02:09] > Connecting to MySQL server... [23:02:09] Loaded 3 filterscripts. [23:02:09] Loaded 3 vehicles from: vehicles/trains.txt [23:02:09] Loaded 3 vehicles from: vehicles/pilots.txt [23:02:09] Loaded 15 vehicles from: vehicles/lv_law.txt [23:02:09] Loaded 39 vehicles from: vehicles/lv_airport.txt [23:02:09] Loaded 255 vehicles from: vehicles/lv_gen.txt [23:02:09] Loaded 38 vehicles from: vehicles/sf_law.txt [23:02:09] Loaded 35 vehicles from: vehicles/sf_airport.txt [23:02:09] Loaded 353 vehicles from: vehicles/sf_gen.txt [23:02:09] Loaded 24 vehicles from: vehicles/ls_law.txt [23:02:09] Loaded 37 vehicles from: vehicles/ls_airport.txt [23:02:09] Loaded 98 vehicles from: vehicles/ls_gen_inner.txt [23:02:09] Loaded 389 vehicles from: vehicles/ls_gen_outer.txt [23:02:09] Loaded 71 vehicles from: vehicles/whetstone.txt [23:02:09] Loaded 168 vehicles from: vehicles/bone.txt [23:02:09] Loaded 61 vehicles from: vehicles/flint.txt [23:02:09] Loaded 96 vehicles from: vehicles/tierra.txt [23:02:09] Loaded 96 vehicles from: vehicles/red_county.txt [23:02:09] Total vehicles from files: 1781 [23:02:09] --------------------------------------- [23:02:09] Running Grand Larceny - by the SA-MP team [23:02:09] --------------------------------------- [23:02:09] Number of vehicle models: 173 [23:02:10]
« Next Oldest | Next Newest »
Users browsing this thread: 3 Guest(s)