MYSQL ERRORS
#1

Код:
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\filterscripts\MySql.pwn(73) : error 035: argument type mismatch (argument 1)
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\filterscripts\MySql.pwn(74) : error 017: undefined symbol "mysql_store_result"
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\filterscripts\MySql.pwn(75) : error 017: undefined symbol "mysql_num_rows"
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\filterscripts\MySql.pwn(77) : error 017: undefined symbol "string"
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\filterscripts\MySql.pwn(77) : error 017: undefined symbol "string"
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\filterscripts\MySql.pwn(77) : error 029: invalid expression, assumed zero
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\filterscripts\MySql.pwn(77) : fatal error 107: too many error messages on one line
Код:
new Query[200],pName[24];
    GetPlayerName(playerid,pName,24);
    format(Query,sizeof(Query),"SELECT `Username` FROM `users` WHERE `Username` = '%s' LIMIT 1",pName);
mysql_query(Query);
mysql_store_result();
if(mysql_num_rows() != 0)//if number of rows is different from 0 then continue
{
format(string,sizeof(string),"Zdravo, %s! \nTvoj nalog je registrovan.\nMolimo unesite lozinku za prijavu!",pName);
ShowPlayerDialog(playerid,0,DIALOG_STYLE_INPUT,"Lo g in",string,"Login","");
}
else
{
format(string,sizeof(string),"Zdravo, %s! \nTvoj nalog nije registrovan. \nRegistrujte se da bi ste nastavili!",pName);
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Re gister",string,"Register","");
}
mysql_free_result();
Код:
stock LoginPlayer(playerid,const password[])
{
new EscapedText[60];
mysql_real_escape_string(password, EscapedText);
format(Query,sizeof(Query),"SELECT * FROM `users` WHERE `Username` = '%s' AND `Password` = '%s'",GetPName(playerid),EscapedText);
mysql_query(Query);
mysql_store_result();
if(mysql_num_rows() != 0)
{
SendClientMessage(playerid,green,"Uspesno si se prijavio!");
LoadStats(playerid);
}
else
{
SendClientMessage(playerid,red,"Pogresna lozinka!");
Kick(playerid);
}
mysql_free_result();
return 1;
}

stock LoadStats(playerid)
{
new pName[24],Query[80];
GetPlayerName(playerid,pName,24);
format(Query, sizeof(Query), "SELECT * FROM `users` WHERE `Username` = '%s' ", pName);
mysql_query(Query);
mysql_store_result();
mysql_fetch_row_format(Query, "|");
sscanf(Query, "e<p<|>s[24]s[23]i>", PInfo[playerid]);
mysql_free_result();
GivePlayerMoney(playerid,PInfo[playerid][Money]);
return 1;
}
help
Reply
#2

help
Reply
#3

what is your mysql version?
and i think you just copied the codes :/
Reply
#4

include or
Reply
#5

Quote:
Originally Posted by Dejan12345
Посмотреть сообщение
include or
both
Reply
#6

i have plugin and include
Reply
#7

Try this code
Код:
new Query[200],string[250],pName[24];
    GetPlayerName(playerid,pName,24);
    format(Query,sizeof(Query),"SELECT `Username` FROM `users` WHERE `Username` = '%s' LIMIT 1",pName);
mysql_query(Query);
mysql_store_result();
if(mysql_num_rows() != 0)//if number of rows is different from 0 then continue
{
format(string,sizeof(string),"Zdravo, %s! \nTvoj nalog je registrovan.\nMolimo unesite lozinku za prijavu!",pName);
ShowPlayerDialog(playerid,0,DIALOG_STYLE_INPUT,"Lo g in",string,"Login","");
}
else
{
format(string,sizeof(string),"Zdravo, %s! \nTvoj nalog nije registrovan. \nRegistrujte se da bi ste nastavili!",pName);
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Re gister",string,"Register","");
}
mysql_free_result();
And For the mysql problem download this version of mysql plugin by BlueG and RE-Compile it !
https://sampforum.blast.hk/showthread.php?tid=56564
Reply
#8

now 9 errors
Reply
#9

cant start mysql plugin need some libmysql
Код:
v0.3.7-R2, ©2005-2015 SA-MP Team

[11:34:04] 
[11:34:04] Server Plugins
[11:34:04] --------------
[11:34:04]  Loading plugin: sscanf
[11:34:04] 

[11:34:04]  ===============================

[11:34:04]       sscanf plugin loaded.     

[11:34:04]    © 2009 Alex "******" Cole

[11:34:04]    0.3d-R2 800 Players "dnee"

[11:34:04]  ===============================

[11:34:04] sscanf error: The current build ONLY supports 0.3d
[11:34:04]   Loaded.
[11:34:04]  Loading plugin: mysql
[11:34:09]   Failed.
[11:34:09]  Loaded 1 plugins.

[11:34:09] 
[11:34:09] Filterscripts
[11:34:09] ---------------
[11:34:09]   Loading filterscript 'TD.amx'...
[11:34:09] 
--------------------------------------
[11:34:09]  Text Draw Editor 1.0RC2 by Zamaroht for SA-MP 0.3 Loaded.
[11:34:09] --------------------------------------

[11:34:09]   Loading filterscript 'TEST.amx'...
[11:34:09] Textdraw file generated by
[11:34:09]     Zamaroht's textdraw editor was loaded.
[11:34:09]   Loaded 2 filterscripts.

[11:34:09] 
----------------------------------
[11:34:09]  BARP V.0.1.0 by Dex 
[11:34:09] ----------------------------------

[11:34:09] Number of vehicle models: 8
Reply
#10

Download It From here files.g-stylezzz.com/libmySQL.dll
or BluG's Original MySQL plugin and u have to add sscanf plugin too not only the include
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)