2 errors - 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: 2 errors (
/showthread.php?tid=331749)
2 errors -
F9 - 05.04.2012
Hello,
I followed this tutorial:
https://sampforum.blast.hk/showthread.php?tid=327345
but I get these errors
Код:
(49) : error 017: undefined symbol "mysql_init"
(286) : error 035: argument type mismatch (argument 3)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Код:
public OnGameModeInit()
{
mysql_init(); // line 49
mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS, MYSQL_DB);
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}
Код:
stock LoginPlayer(playerid, pass[])
{
new query[1000];
format(query, sizeof(query),"SELECT * FROM serverdb WHERE username = '%s' AND password = md5('%s')",serverdb[playerid][username],pass);
mysql_query(query);
mysql_store_result();
if(mysql_num_rows() != 0)
{
if(mysql_fetch_row(query, "|")) // line 286
{
sscanf(query,"e<p<|>s[24]s[32]iii>", serverdb[playerid]);
new str[80];
format(str, sizeof(str),"Welcome %s, you have been logged to your account",serverdb[playerid][username]);
SendClientMessage(playerid, COLOR_BLUE, str);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerScore(playerid, serverdb[playerid][score]);
GivePlayerMoney(playerid, serverdb[playerid][money]);
SpawnPlayer(playerid);
serverdb[playerid][logged] = 1; // set player logged variable true
}
}
else
{
ShowPlayerDialog(playerid,LOGIN_DIALOG,DIALOG_STYLE_PASSWORD,"Login to Account.","Wrong password:","Login","Cancel");
}
}
Re: 2 errors -
blank. - 05.04.2012
The tutorial is based on StrickenKid's MySQL plugin and you're using BlueG's as it seems.
Can you show me line 286?
Re: 2 errors -
F9 - 05.04.2012
It's already up there..
Код:
if(mysql_fetch_row(query, "|")) // line 286
Re: 2 errors -
F9 - 05.04.2012
anyone?