error 017: undefined symbol "mysql_query"! plz help -
FunnyBear - 07.03.2013
Hey guys, I was making a MySQL reg/login system, cos I was bored on yini. But I got this error:
Код:
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\LOSSAN~1\GAMEMO~1\MySQL.pwn(59) : error 017: undefined symbol "mysql_query"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Here:
Код:
public OnPlayerConnect(playerid)
{
new query[126], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
format(query, sizeof(query), "SELECT * FROM accounts WHERE name = '%s'", pName);
mysql_query(query); /// THIS LINE HAS THE ERROR!
mysql_store_result();
return 1;
}
Please help me!
Re: error 017: undefined symbol "mysql_query"! plz help -
RenovanZ - 07.03.2013
are you already do this ?
Re: error 017: undefined symbol "mysql_query"! plz help -
Vince - 07.03.2013
SEARCH already! This has been asked literally thousands of times.
https://www.******.be/#hl=nl&safe=of...w=1280&bih=919
Re: error 017: undefined symbol "mysql_query"! plz help -
FunnyBear - 07.03.2013
I tried,
Код:
format(query, sizeof(query), "SELECT * FROM accounts WHERE name = '%s'", pName);
mysql_function_query(query);// but i still get an error here
I get an error there at mysql_function_query
Код:
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\LOSSAN~1\GAMEMO~1\MySQL.pwn(59) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Re: error 017: undefined symbol "mysql_query"! plz help -
RenovanZ - 07.03.2013
use
instead of
pawn Код:
mysql_function_query(query);
Re: error 017: undefined symbol "mysql_query"! plz help -
iggy1 - 07.03.2013
It's not a matter of using
mysql_function_query the same as
mysql_query they are different functions.
This tut may help you understand better
https://sampforum.blast.hk/showthread.php?tid=337810
Quote:
Originally Posted by Kiyozi_Mu
use
instead of
pawn Код:
mysql_function_query(query);
|
Did you even read the thread title?
Re: error 017: undefined symbol "mysql_query"! plz help -
FunnyBear - 07.03.2013
Quote:
Originally Posted by iggy1
|
It still doesn't make any sense?
Код:
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\LOSSAN~1\GAMEMO~1\MySQL.pwn(66) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Код:
mysql_function_query("SELECT * FROM accounts WHERE name = '%s'", pName);
Re: error 017: undefined symbol "mysql_query"! plz help -
iggy1 - 07.03.2013
You will either need to learn to use threaded queries (from the link i posted), or use an older plugin version. It's not a matter of swapping code here and there, it's a completely different system and does not work at all like the old version.
As for the new warning, you have to pass a database handle as the first argument. The handle is returned by mysql_connect.
Re: error 017: undefined symbol "mysql_query"! plz help -
FunnyBear - 07.03.2013
Can someone explain to me how to use MySQL query function
Re: error 017: undefined symbol "mysql_query"! plz help - Patrick - 07.03.2013
MySQL Query Function:
https://sampwiki.blast.hk/wiki/MySQL#mysql_query
read this thread first
https://sampforum.blast.hk/showthread.php?tid=56564 before you start scripting MySQL