Ok.

Just a couple of things i would like to know before i help.

What Version are you using?
Are you using Commercial or Pro?

Ok. Whats in your function main you need to connect to the Database within your Main function or before you do ANY querys. Have you donwloaded teh file that is on page one and put all DLL's in the right folders of your Game Studeio folder. Have you "Included" them into your script and all of teh commands.

For example. Below is every single bit of script i have in my login script for my game but it connects locally to 127.0.0.1 because i dont have pro..
Code:

//LOGIN STERINGS
string Login_Query; // holds the mysql query
string username[16]; // holds the username
string password; // holds the password
string libmysqldll = <libmysql.dll>;
var_nsave mysql_handle;



Then
Code:

////////////////////
//DATABASE FUNCTIONS
dllfunction mySQL_Connectdb(w,x,y,z);
dllfunction mySQL_Closedb();
dllfunction mySQL_ExecQuery(string);
dllfunction mySQL_GetVal(x,y);
dllfunction mySQL_GetStr(string,x,y);
dllfunction mySQL_RowNumber();
dllfunction mySQL_IsConnected();



After this i have all of my panels/texts that are in the login script. have you added functions to these to handle the login scripts wich mine will be below.

Code:

////////////////////
//TEXT'S
text txtName
{
pos_x = 575;
pos_y = 115;
layer = 30;
font fnt_century12;
string username;
}
text txtPassword
{
pos_x = 575;
pos_y = 115;
layer = 30;
font fnt_century12;
string password;



Now for what is in my function Main.
Code:

//Main Function
function main()
{

mouse_on();
level_load(MPLevel); //Load the first level
sleep(.2);
While (!bat_set)
{
wait(1);
}
mysql_handle = dll_open(libmysqldll);
mySQL_Connectdb("databse","host","user","password");
}



Ok now i have a buttony ou push then a login apears. within this is the login script that i use for the 2 Textxs that were showsn earlier.
Code:

mySQL_Connectdb("databse","host","user","password");
if(!mySQL_IsConnected()&&!mySQL_Connectdb("databse","host","user","password"))
{
beep;
exit;
}
txtName.visible = on;
inkey(username);
txtName.visible = off;
txtPassword.visible = on;
inkey(password);
txtPassword.visible = off;

str_cat(Login_Query, "select * from Accounts WHERE Account_Name='");
str_cat(Login_Query, username);
str_cat(Login_Query, "' AND Password='");
str_cat(Login_Query, password);
str_cat(Login_Query, "';");
mySQL_ExecQuery(Login_Query);
if(mySQL_ExecQuery(Login_Query)&&mySQL_RowNumber()==1)
{
Join_Game();
}
else
{
beep;
exit;//if no entry, exit

}



Ok thats it all of my scripts that are needed for a logging but make sure that te game is being hosted first or else it wil not work.

Make sure you downloaded the MYsql software that you need and that it is all hosted. If your doing it localy. if your doing it on a Dedicated server it should be on there. Make sure that the hjost of your Ded Server allows you to connect to the database like this it should.

If you are still havign problems the reply again you shoudl have ot tell it to connect to teh internet as your net should always be open. or you will have to connect.

Think thats everything.


A6 Commercial V6.3 1024MB DDR RAM P4 2.8GHz 256MB GeForce FX 5600 160GB HDD