SA-MP Forums Archive
Help please - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help please (/showthread.php?tid=328025)



Help please - [HHT]DRON - 23.03.2012

help to correct a error
Код:
D:\Games\SAMP сервер\SampDM\gamemodes\Untitled.pwn(20) : error 017: undefined symbol "mysql_init"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Код:
public OnGameModeInit()
{
mysql_init();//here error
if(mysql_connect("localhost", "root", "vertrigo", "samp"))
{
print("Connection established");
}
else
{
print("Connection not established");
}
return 1;
}



Re: Help please - BrandyPenguin - 23.03.2012

What mysql plugin you use?


Re: Help please - [HHT]DRON - 23.03.2012

mysql and libmySQL


Re: Help please - [HHT]DRON - 23.03.2012

will help me?


Re: Help please - [HHT]DRON - 24.03.2012

help to correct a error,please.


Re: Help please - Vladamir - 24.03.2012

You need to define
Quote:

mysql_init

Do you maybe have a missing Include perhaps?
Quote:

#include <a_mysql>

Also you may want to use
Quote:

mysql_connect

as opposed to
Quote:

mysql_init

** since this doesn't look like a native function.


Re: Help please - [HHT]DRON - 24.03.2012

#include <a_mysql> have it.Can give me standard function mysql_init?


Re: Help please - [HHT]DRON - 24.03.2012

Код:
D:\Games\SAMP сервер\SampDM\filterscripts\adminka.pwn(20) : warning 204: symbol is assigned a value that is never used: "mysql"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.



Re: Help please - Vladamir - 24.03.2012

Hopefully this helps

Quote:

#define FILTERSCRIPT

#include <a_samp>

#define SQL_HOST "YOUR HOST/IP (usually localhost)"
#define SQL_USER "YOUR USER NAME"
#define SQL_DATA "YOUR DATA"
#define SQL_PASS ""

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
mysql_debug(1);
mysql_connect(SQL_HOST, SQL_USER, SQL_DATA, SQL_PASS);
return 1;
}

public OnFilterScriptExit()
{
mysql_close();
return 1;
}

#endif

public OnGameModeInit()
{
mysql_debug(1);
mysql_connect(SQL_HOST, SQL_USER, SQL_DATA, SQL_PASS);
return 1;
}

public OnGameModeExit()
{
mysql_close();
return 1;
}

Make sure you are defining the connection ok?
Quote:

new MySQL:connection = mysql_init(LOG_ONLY_ERRORS, 1);
mysql_connect(localhost, root, pass, data,connection);

=============================


Re: Help please - [HHT]DRON - 24.03.2012

the error is corrected, but there is no dialog box with registration