Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (7th_zorro, ozgur, Quad), 858 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 4
Page 7 of 24 1 2 5 6 7 8 9 23 24
Re: MySQL dll [Re: KyiasShadow] #41677
05/14/05 23:13
05/14/05 23:13
Joined: Mar 2004
Posts: 281
England
frescosteve Offline
Member
frescosteve  Offline
Member

Joined: Mar 2004
Posts: 281
England
ok i have this at the top of the script:

dllfunction mySQL_Connectdb(w,x,y,z); // declaration of a DLL function
dllfunction mySQL_Closedb();
dllfunction mySQL_ExecQuery(string);
dllfunction mySQL_GetVal(x,y);
dllfunction mySQL_GetStr(string,x,y);
dllfunction mySQL_RowNumber();
dllfunction mySQL_IsConnected();

this at the bottom of the main function:

dll_open("A6mySQL.dll");
mySQL_Connectdb( "mytablename", "localhost", "myusername", "mypassword");

i have the two dll's in the directry my work is in and in the acknex_plugins folder.?? any ideas?

Re: MySQL dll [Re: frescosteve] #41678
05/18/05 23:46
05/18/05 23:46
Joined: Mar 2004
Posts: 217
UK (Peterborough)
KyiasShadow Offline
Member
KyiasShadow  Offline
Member

Joined: Mar 2004
Posts: 217
UK (Peterborough)
Jesus ****, about time lol.

Thanky you. i changed the

dll_open("A6mySQL.dll");
mySQL_Connectdb( "mytablename", "localhost", "myusername", "mypassword");

Form the top of my main to the bottom and it worked fine. wtf weird.

Thanks all this is a 5***** Topic.


A6 Commercial V6.3 1024MB DDR RAM P4 2.8GHz 256MB GeForce FX 5600 160GB HDD
Re: MySQL dll [Re: KyiasShadow] #41679
06/30/05 14:38
06/30/05 14:38
Joined: Apr 2002
Posts: 4,801
Richmond B.C., Canada
Captain_Kiyaku Offline

Dichotomic
Captain_Kiyaku  Offline

Dichotomic

Joined: Apr 2002
Posts: 4,801
Richmond B.C., Canada
hmm i can't connect to my database o_O
this is my script:

function fnc_connect_to_database()
{
wait(1);
dll_open("A6mysql.dll");
hr = mySQL_Connectdb("databse", "host", "user", "password");
while(1)
{
draw_text(str_for_num(blub, hr), 200,200, vector(0,0,255));
wait(1);
}
}

of course i used my real log in data in the script, but i can't connect.
my PHP files works all with thoose settings.

I can ping my website too so i don't think it's an internet problem? i even closed the firewall.

Do i have to tell 3dgs it should connect to the internet before i start it?
(i even can't do network tests with 3dgs anymore...)

well the variable hr always returns 0, so it's not connected.


My Blog

"Tag und Nacht schrei ich mich heiser,
Wind weht alle Worte fort,
Tag und Nacht schrei ich mein Krähenwort!"

Subway To Sally - Krähenkönig
Re: MySQL dll [Re: Captain_Kiyaku] #41680
07/01/05 12:32
07/01/05 12:32
Joined: Mar 2004
Posts: 217
UK (Peterborough)
KyiasShadow Offline
Member
KyiasShadow  Offline
Member

Joined: Mar 2004
Posts: 217
UK (Peterborough)
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
Re: MySQL dll [Re: KyiasShadow] #41681
07/01/05 12:51
07/01/05 12:51
Joined: Apr 2002
Posts: 4,801
Richmond B.C., Canada
Captain_Kiyaku Offline

Dichotomic
Captain_Kiyaku  Offline

Dichotomic

Joined: Apr 2002
Posts: 4,801
Richmond B.C., Canada
that's a good explanation, thanks :>

you said: "but it connects locally to 127.0.0.1 because i dont have pro.."
Does it mean only the pro version can connect to a webserver?
Well i have the newest com version. So this might be the problem?


My Blog

"Tag und Nacht schrei ich mich heiser,
Wind weht alle Worte fort,
Tag und Nacht schrei ich mein Krähenwort!"

Subway To Sally - Krähenkönig
Re: MySQL dll [Re: Captain_Kiyaku] #41682
07/01/05 14:14
07/01/05 14:14
Joined: Mar 2004
Posts: 217
UK (Peterborough)
KyiasShadow Offline
Member
KyiasShadow  Offline
Member

Joined: Mar 2004
Posts: 217
UK (Peterborough)
Yes. only Pro can connect to a web server. From what i understand this may be your problem.

You might have ot ask conitec them selfs but i think thats your problem im saving up for pro so i can do mor then 4 players


A6 Commercial V6.3 1024MB DDR RAM P4 2.8GHz 256MB GeForce FX 5600 160GB HDD
Re: MySQL dll [Re: KyiasShadow] #41683
07/01/05 17:01
07/01/05 17:01
Joined: Apr 2002
Posts: 4,801
Richmond B.C., Canada
Captain_Kiyaku Offline

Dichotomic
Captain_Kiyaku  Offline

Dichotomic

Joined: Apr 2002
Posts: 4,801
Richmond B.C., Canada
-_- so this will be the problem :<

That sucks a lot ^^'' Well i have no money for the pro so i better find another way...


My Blog

"Tag und Nacht schrei ich mich heiser,
Wind weht alle Worte fort,
Tag und Nacht schrei ich mein Krähenwort!"

Subway To Sally - Krähenkönig
Re: MySQL dll [Re: Captain_Kiyaku] #41684
07/02/05 13:22
07/02/05 13:22
Joined: Mar 2004
Posts: 217
UK (Peterborough)
KyiasShadow Offline
Member
KyiasShadow  Offline
Member

Joined: Mar 2004
Posts: 217
UK (Peterborough)
Yes same here.

Just do what im doing do it locally and test it on a lan like i am you dont even need 2 computers just run server then player on teh same computer and connect to 127.0.0.1 and install all MYSql that you need on your computer. or you could just say connect to localhost , user = root, password what ver you set when you set it up.. Check page 1 to find out where you can get it from.

Good luck.


A6 Commercial V6.3 1024MB DDR RAM P4 2.8GHz 256MB GeForce FX 5600 160GB HDD
Re: MySQL dll [Re: KyiasShadow] #41685
07/02/05 14:01
07/02/05 14:01
Joined: Apr 2002
Posts: 4,801
Richmond B.C., Canada
Captain_Kiyaku Offline

Dichotomic
Captain_Kiyaku  Offline

Dichotomic

Joined: Apr 2002
Posts: 4,801
Richmond B.C., Canada
hmm yes, but i actually want people to connect over the internet to my server program and send there position and other informations to a database to save it there.
^^


My Blog

"Tag und Nacht schrei ich mich heiser,
Wind weht alle Worte fort,
Tag und Nacht schrei ich mein Krähenwort!"

Subway To Sally - Krähenkönig
Re: MySQL dll [Re: Captain_Kiyaku] #41686
07/04/05 21:47
07/04/05 21:47
Joined: Mar 2004
Posts: 217
UK (Peterborough)
KyiasShadow Offline
Member
KyiasShadow  Offline
Member

Joined: Mar 2004
Posts: 217
UK (Peterborough)
Sounds like a way that may cause some Lag.

Lets see if i thinkw hat your saying is:
They to run the game
You to run game as server
Them to connect to your server over internet?
all stats saved to SQL server....

they will still have to connect to the server. you might still need pro..


A6 Commercial V6.3 1024MB DDR RAM P4 2.8GHz 256MB GeForce FX 5600 160GB HDD
Page 7 of 24 1 2 5 6 7 8 9 23 24

Moderated by  adoado, checkbutton, mk_1, Perro 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1