Login Server for leechers
Well, I have been working on this, start learning C++ in teh past few weeks,
This what I have made so far:
Code:
#include <iostream>
#include <MySQL>
#include <string>
using namespace std;
string query; //query
string acctname; // acccount name
string acctpass; // pass for the account
string email; // email for account (check)
int main () {
cout << "Initializing MySQL...\n"; //still have to work on this
MYSQL mysql;
//Initiatilize
if (mysql_init(&mysql)) {
cout << "Initialize successful!\n";
}
else {
cout << "Initialize failed!\n";
return 0;
}
//Connect (still doenst work YET)
cout << "\nConnecting to database...\n";
if (mysql_real_connect(&mysql,"127.0.0.1","root","passhere","dbname",0,0,0)) {
cout << "Connected to database.\n";
}
else {
cout << "Connection failed!\n";
return 0;
}
query = "INSERT INTO accounts (acctname,acctpass,email) VALUES ('";
cout <<"\nAccount Name:\n"; // acc in DB
cin >> acctname; // name of acc that gets stored
cout << "\nAccount Password:\n"; // AccName
cin >> acctpass; //Pass needed CharServer acces
cout << "\nEmail:\n";
cin >> email; // email
query.append(acctname);
query.append("','");
query.append(acctpass);
query.append("','");
query.append(email);
query.append("')");
cout << "\n[SQL CODE] - \" " << query << " \" \n";
mysql_query(&mysql,query.c_str());
while (true) {
}
}
Well, here it is.
I know its not done yet, but im still beginning
I will make it a executeble and usable and working login server tomorrow.
But its late here, gonna sleep bye.
Leech as much as u want I dont care. I know how it is to be a Nub. I was leecher first to, I started to learn C++ to help al those leechers.
Yes u may think: WTF HELPING LEECHERS!?, well come people cant create stuff so lets help em :D
-ZiRioN
Re: Login Server for leechers
shouldn't this be in dev section o:?
Re: Login Server for leechers
Dev Section, not a complete release
Re: Login Server for leechers
Wow, I learned how to make if else statements work from reading that...
Re: Login Server for leechers
hopefully this will inspire some leechers to learn something ;]
Re: Login Server for leechers
Yea boi!! I am learning C++ now, and this will give me a push on making something on my own.
I hope you dont mind if i use some of your code ?
Cheers, Much love.
Good Luck.
Re: Login Server for leechers
Re: Login Server for leechers
I wanna learn C++, but it looks so complicated, and Im 14 years old, so I dont think I can learn yet xD
Re: Login Server for leechers
Jeffijoe you know that i'm 14 too right?
Re: Login Server for leechers
The sooner you start the better. It's just a matter of will and patience to learn, since you won't just learn by reading a page or two. You have to study.
Re: Login Server for leechers
you wanna make a login server?
you got a long road ahead if you cannot figure out sockets and winsock.
Also don't use cout. its so deprecated. use printf out use a Log class.
I can give you a little push in getting some socket classes going but then you are on your own.
Re: Login Server for leechers
i'm learning C++ so its really help me... Thanks =)
Re: Login Server for leechers
Quote:
Originally Posted by
FrostElite
Jeffijoe you know that i'm 14 too right?
Don't see this as a flame but you probelly don't master / can make decent programs whit c++ yet
but its good you already started out.
Re: Login Server for leechers
Quote:
Originally Posted by
wardoooo
Don't see this as a flame but you probelly don't master / can make decent programs whit c++ yet
but its good you already started out.
I know , theres some stuff that Im not too sure about with c++ but I know Alot if i do say so myself, some top developers on ragezone are even younger than me ;D
Re: Login Server for leechers
Re: Login Server for leechers
i like the hardcoded sql info cause some people have been snooping around my databases
Re: Login Server for leechers
Quote:
Originally Posted by
Jeffijoe
I wanna learn C++, but it looks so complicated, and Im 14 years old, so I dont think I can learn yet xD
Hey im 14 too, and I learned it too so anyone can do it :8:
but actually, C++ isnt really that hard, u should learn the basic structurers of a program.
I got the Login working now.
Almost done with the Char server.
I dont think I will go on with world, dephends how much spare time I will have.
and Jeffijoe(or anyone else) if u need some help PM me so I can add u on msn.
-ZiRioN-