SA-MP Forums Archive
MySQL_Static - 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: MySQL_Static (/showthread.php?tid=547350)



MySQL_Static - Tony$$ - 22.11.2014

Loaded BlueGs MySQL static plugin. And everything working except it wont show me the login dialog. I looked into the logs then i found this
Code:
Failed to connect to MySQL !
This is what i scripted in
Code:
//MySQL Information
new dbHandle;
#define SQL_HOST "127.0.0.1"
#define SQL_USER "*******"
#define SQL_PASS "********"
#define SQL_DB "MalikK"
And the MySQL database dosent exist.
but since im using Static plugin do i need a specific detail that i have to write down in?
Code:
//MySQL Information
new dbHandle;
#define SQL_HOST "127.0.0.1"
#define SQL_USER "*******"
#define SQL_PASS "********"
#define SQL_DB "MalikK"



Re: MySQL_Static - Tony$$ - 22.11.2014

I mean i didn't scripted it in. But yeah


Re: MySQL_Static - Tony$$ - 22.11.2014

OKay now i left them empty like this

Code:
//MySQL Information
new dbHandle;
#define SQL_HOST ""
#define SQL_USER ""
#define SQL_PASS ""
#define SQL_DB ""
And then i saw the logs
Code:
Connected to MySQL !
It shows me this. But the login dialog still wont show up. Any help?


Re: MySQL_Static - Ryz - 22.11.2014

login dialog codes plz! paste here


Re: MySQL_Static - Tony$$ - 22.11.2014

Code:
public OnPlayerAttemptLogin2(playerid)
{
	new rows, fields;
	cache_get_data(rows, fields, dbHandle);
	if(rows)
	{
		format(msg, sizeof(msg), "Welcome to Molotov Roleplay Gaming, %s\nThis user was found in our database, please enter your password below to login.\n\nYou have 60 seconds to login.", GetName(playerid));
		ShowDialog(playerid, Show:<Login>, DIALOG_STYLE_INPUT, ""EMBED_YELLOW"Molotov Roleplay Gaming Login"EMBED_WHITE"", msg, "Login", "Quit");
		LoginTimer{playerid} = SetTimerEx("CheckPlayerLogged", 60000, 0, "i", playerid);
	}
	else
	{
		ShowDialog(playerid, Show:<ConfirmWord>, DIALOG_STYLE_INPUT, ""EMBED_RED"Secret word confirmation"EMBED_WHITE"", ""EMBED_WHITE"The IP you are using is not the same for\nthis account, please enter the secret word of the player.", "Okay", "Exit");
	}
}



Re: MySQL_Static - Tony$$ - 23.11.2014

Should i change anything?


Re: MySQL_Static - Ryz - 23.11.2014

try changing
pawn Code:
new dbHandle;
to
pawn Code:
static dbHandle;



Re: MySQL_Static - Tony$$ - 23.11.2014

Quote:
Originally Posted by Ryz
View Post
try changing
pawn Code:
new dbHandle;
to
pawn Code:
static dbHandle;
Dosent work.


Re: MySQL_Static - Tony$$ - 23.11.2014

Ryz can you accept my friend request on skype?


Re: MySQL_Static - MD5 - 23.11.2014

Show us your "OnPlayerConnect".