Help please
#1

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;
}
Reply
#2

What mysql plugin you use?
Reply
#3

mysql and libmySQL
Reply
#4

will help me?
Reply
#5

help to correct a error,please.
Reply
#6

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.
Reply
#7

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

Код:
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.
Reply
#9

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

=============================
Reply
#10

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


Forum Jump:


Users browsing this thread: 1 Guest(s)