The online racing simulator
.NET (C#) - Open Source Cruise Server (Mod)(Functional, but unfinished)
Well I have had no motivation lately to finish this, I might some day though...

Anyways there are a few bugs (should really open the db each query group instead of leaving it open).

And a ton of wip shit... (Functional but not finished)
•Command System
•Mysql
•Connection Struct
•MCI Handler
•Status System
•ATM (o lawd)
•Lots more

All the WIP stuff is functional it is just a wip .

If lots of people are interested I might finish it but I have no reason atm (Don't play LFS much right now).

Download:
http://rapidshare.com/files/14 ... s_external_csf11.rar.html

Note: "MWAH4HA Y0U LEFt YOUr InFo IN!", The server has been dead forever, I don't care...
Attached files
lfs_external_csf11.rar - 1.3 MB - 2146 views
-
(sun) DELETED by the_angry_angel : Pointless chatter.
-
(Robbo01) DELETED by the_angry_angel : Pointless chatter.
-
(sun) DELETED by the_angry_angel : Pointless chatter.
-
(AndroidXP) DELETED by the_angry_angel : Pointless chatter.
-
(dougie-lampkin) DELETED by the_angry_angel : Pointless chatter.
-
(dawesdust_12) DELETED by the_angry_angel : Pointless chatter.
How big is the file? Can't upload it here?
Only ask because I hate rapidshare.
~1,3MB - this is the size.
added an attachment.
#5 - sun
i get errors:

Are you sure this code works? because it doesnt... Why upload when it doesnt?
Attached images
MySQL error.JPG
-
(RacerAsh3) DELETED by the_angry_angel
-
(sun) DELETED by the_angry_angel
Quote from sun :Are you sure this code works? because it doesnt... Why upload when it doesnt?

.NET (C#) - Open Source Cruise Server (Mod)(unfinished)

Might want to ask yourself the same question... (i.e your `tutorial` on writing files in PHP)
Also, Sun - It'd likely (this is a completely uninformed guess) work if you had the mysql.dll in the project, so it knows where to find all the functions in the MySQL namespace.
#8 - sun
thx dawesdust...

-------------------------------

Well, if it is unfinished, he should of still made it worked for people to learn from! not make errors!
-
(JasonJ) DELETED by JasonJ
Quote from sun :thx dawesdust...

-------------------------------

Well, if it is unfinished, he should of still made it worked for people to learn from! not make errors!

If you cannot figure out how to fix these errors you really need to go read more tutorials.

http://dev.mysql.com/downloads/connector/net/5.0.html

Why am I even helping...
#10 - sun
Because your the kind of person who does.
... yes, but you're incapable of helping yourself or learning by yourself.
Quote from sun :Because your the kind of person who does.

Too tired, was that an insult?
#13 - sun
no..
#14 - sun
Anyways, i think i found my problem... Theres a file missing in the Reerences called 'MySQL.Data'. Has anybody else have the file?
wow just wow.
Quote from elmohellno :wow just wow.

I think that yet again, we opened another Pandoras Box of sun.

<prepares for my imminent ban for losing my head>
sun, you've been given the solution. Install the MySQL development libraries for .NET.

If you're unclear as to how to proceed either approach someone in private who uses .NET, or read up on that library and understand how to integrate it into your project.

It's been made clear that ignorance is no longer an excuse and you will get the same treatment as others who taunt you. The reason being that you are the other half of the problem.


Quote from dawesdust_12 :<prepares for my imminent ban for losing my head>

No ban, but there are infractions. For both parties involved.

Responding in the way that people have to sun is half of the problem. I am fed up with saying this politely - if you aren't giving advice, and you only want to troll, **** off.

I'll remove all the crap from this thread in a few days time.
Karl, no disrespect intended but we did help him, we told him what was missing (and a quick google search regards the missing thing as the first result, even with an installer.) We offered him advice and help, yet he is incapable of following even the most basic instructions.

After over a year of this, he is still incapable of thinking for himself, or analyzing basic errors from a compiler, and even tossing them into google. He treats the last thread he posted in as if it's a global IM, and we're all his personal support team. It's not even that he comes here with a descriptive question as to why 1 thing isn't working, he's posting huge questions as if he hasn't even tried. For example, his "Lottery system" thread, along with his button system fiascos.

Like, if he tried, then fine, but it's like he expects us to all be his personal coders and I think that if that's the case, then the Programmer forum -- particularly anywhere NOT the request forum -- is not the place for him.

I'm sorry for this reply, but I'm sorry - his attempts at "programming" have been as successful as my attempts at 3d modelling.
Quote from dawesdust_12 :I'm sorry for this reply, but I'm sorry - his attempts at "programming" have been as successful as my attempts at 3d modelling.

I have proof
Attached images
3d.jpg
Quote from dawesdust_12 :We offered him advice and help, yet he is incapable of following even the most basic instructions.

I'm not disputing that. I am disputing how this whining and bitch reoccurs over and over and over again.

Quote from dawesdust_12 :He treats the last thread he posted in as if it's a global IM, and we're all his personal support team.

No one is forcing you to read or reply. Ignore him if you do not want to deal with him. This is the crux of my issue with the "sun situation".

If you ignore him and his questions go unanswered, then he will be forced to search and learn. If he can't then maybe something will sink in.

The way in which people continually answer his questions, then moan and bitch when he doesn't "get it" is making this place a nasty place to post. I cannot for the life of me see this happening if we were all in the same room together. Would you really all sit there and go "haha, you're shit!"? Equally though the point that "you need to go and learn the BASICS before you can do everything" would also be hammered home to sun a lot more easily.
is there any database file to upload to mysql? How do i get this to work.
Can someone help?
I don't get how to use this.
#23 - PoVo
I got this to work, it starts but i dunno how to make it connect to Insim, it turns on and does nothing.
Great job bumping this. You have changed IP, Pass and port settings?
#25 - PoVo
Ofcourse i have, i suspect its my SQL file, i dont understand the kines where like From Useres Where USERNAME, do i have to change something there?


query.CommandText = query.CommandText.Substring(0,query.CommandText.Length-2);
query.CommandText+=" FROM Users WHERE username='" + Escape(c.Username) + "'";
query.Prepare();
MySqlDataReader dr = query.ExecuteReader();
if (dr.HasRows)
{
foreach (FieldInfo mi in typeof(clsConnection).GetFields())
{
foreach (StatsAttribute a in mi.GetCustomAttributes(typeof(StatsAttribute), false))
{
dr.Read();
if (mi.FieldType.Name == "String")
{
mi.SetValue(c, (object)dr.GetString(a.Name));
}
else if (mi.FieldType.Name == "Int32")
{
mi.SetValue(c, (object)dr.GetInt32(a.Name));
}
else if (mi.FieldType.Name == "Byte")
{
mi.SetValue(c, (object)dr.GetByte(a.Name));
}
}
}
}
else
{
dr.Close();
return false;
}
dr.Close();
return true;
}
public void AddUser(clsConnection c)
{
if (c.Username == "")
return;
List<string> users = new List<string>();
List<string> values = new List<string>();
int i = 0;
foreach (FieldInfo mi in typeof(clsConnection).GetFields())
{
foreach (StatsAttribute a in mi.GetCustomAttributes(typeof(StatsAttribute), false))
{
users.Add(a.Name);
values.Add("'" + mi.GetValue(c) + "'");
i++;
}
}
string query = "INSERT INTO Users(" + string.Join(",", users.ToArray()) + ") VALUES (" + string.Join(",", values.ToArray()) + ");";
Query(query);
}
public void UpdateUser(clsConnection u)
{
if (u.Username == "")
return;
string query = "UPDATE Users SET ";
foreach (FieldInfo mi in typeof(clsConnection).GetFields())
{
foreach (StatsAttribute a in mi.GetCustomAttributes(typeof(StatsAttribute), false))
{
if (a.Name != "username" && a.Name != "joindate")
query += a.Name + "='" + Escape(mi.GetValue(u).ToString()) + "', ";
}
}
query = query.Substring(0, query.Length - 2);
query += " WHERE username='" + Escape(u.Username) + "';";
Query(query);
}
public void AddCar(string username, string car)
{
Query("INSERT INTO " + car + "(username) VALUES ('" + Escape(username) + "');");
}
public List<string> GetCars(string username)
{
if (username == "")
return new List<string>();
List<string> ret = new List<string>();
MySqlCommand query = new MySqlCommand();
query.Connection = SQL;
query.CommandText = "";
foreach (string s in Cars)
query.CommandText+= "SELECT * FROM " + s + " WHERE username='" + Escape(username) + "';";
query.Prepare();
MySqlDataReader dr = query.ExecuteReader();
int i = 0;
do
{
while (dr.Read())
{
if (dr.GetString(0) != "")
{
ret.Add(Cars[i]);
}
}
i++;
} while (dr.NextResult());
dr.Close();
return ret;
}
public void RemoveUser(string username)
{
Query("DELETE FROM Users WHERE username='" + Escape(username) + "'");
}
public bool GetOfficer(string username)
{
if (username == "")
return false;
MySqlCommand query = new MySqlCommand();
query.Connection = SQL;
query.CommandText = "SELECT * FROM Police WHERE username='" + Escape(username) + "';";
query.Prepare();
MySqlDataReader dr = query.ExecuteReader();
if (dr.HasRows)
{
dr.Close();
return true;
}
dr.Close();
return false;
}
public void RemoveOfficer(string username)
{
Query("DELETE FROM Police WHERE username='" + Escape(username) + "'");
}
public void AddOfficer(string username)
{
Query("INSERT INTO Police(username) VALUES ('" + Escape(username) + "');");
}
public void RemoveCar(string username, string car)
{
Query("DELETE FROM " + car + " WHERE username='" + Escape(username) + "'");
}
public bool StartUp()
{
try

1

FGED GREDG RDFGDR GSFDG