03.07.2012, 15:46
Thank you very much, that functions !
Now, the problem is that when I do that, the server crash :
I use this plugin by StrickenKid : https://sampwiki.blast.hk/wiki/MySQL_Plugin
The parameters are : mysql_fetch_field(const fieldname[], dest[], MySQL:handle)
What is wrong in my code ?
Here is an example of code with this plugin : http://www.strickenkid.com/mysql_plugin/example.pwn
In the second /login, you can see that he do the same thing as me when the server crashed...
I don't understand :/
Now, the problem is that when I do that, the server crash :
Код:
new query[128], data[256]; GetPlayerName(playerid, pPseudo[playerid], sizeof(pPseudo[])); format(query,128, "SELECT * FROM members WHERE pseudo = '%s' LIMIT 1", pseudo[playerid]); mysql_query(query), mysql_store_result(); if(mysql_num_rows()) { new sConnexion[128]; mysql_fetch_field("password", pPassword[playerid]); // I have added this line format(sConnexion, sizeof(sConnexion), "{009FFB}Hello, {0032FB}%s !\n\n{009FFB}Please enter your password :", pPseudo[playerid]); ShowPlayerDialog(playerid, 1, DIALOG_STYLE_PASSWORD, "Connexion", sConnexion, "Connexion", "Exit"); } else { //Register dialog here. }
The parameters are : mysql_fetch_field(const fieldname[], dest[], MySQL:handle)
What is wrong in my code ?
Here is an example of code with this plugin : http://www.strickenkid.com/mysql_plugin/example.pwn
In the second /login, you can see that he do the same thing as me when the server crashed...
I don't understand :/