The online racing simulator
#1 - sun
Make the inSim insim program make new txt files with the user data
HI

I have dedided to do my database as txt files so the txt doc files hold the users data. and i dont know how to get the inSim program to make new txt doc files with the user's Cash and Cars. Can eny body help ?

Thanks. Owen s2 Licenced.
I don't like to say this, but you need to stop making these sorts of threads and just actually put some effort into learning how to program. If you are not prepared to learn to program, then I think it's best to stop this silly endeavour now. You cannot, cannot, cannot make the sort of InSim application you are looking for in this way, in fact you cannot make any sort of program this way.

You need to start from the beginning, which means spending some time studying basic programming lessons in your chosen language. I'll give you a hint, the kind of input/output you are looking for will be in those lessons, as well as the answers to probably a hundred other questions you will at some point ask.

From reading your many posts in this forum it seems like you just want to conjure a InSim program from thin-air, without actually putting any effort whatsoever into learning how to make them. It's been said time and time again around here, but in order to make an InSim program you first of all need to learn how to program. Please stop skipping this vitally important step and go learn the fundamental basics of what it is you are trying to do.

Heck, if you tell me what programming language you're working with I will personally find you some tutorials that will help you learn. The same goes for all the other people who keep asking these sorts of basic fundamental questions that they would know the answer to if they even put in a few hours of research.

I'm sorry, I don't mean to sound harsh, but if you really want to write InSim applications then you need to start going about it properly, instead of posting these sorts of questions and expecting us to do all your work.

</rant>
Couldnt agree more, also if you make insim programs you need to learn how to maintain them incase of bugs and errors...
#4 - sun
oh well i dont know what laugauge but i could send you my script if you give me your email addrsss i could email it.
Quote from sun :oh well i dont know what laugauge but i could send you my script if you give me your email addrsss i could email it.

sun, not to be rude, but I don't know how it's possible to even contemplate writing an insim client for LFS if you don't know what language you're using.

You mentioned in another thread that you were doing something with "greenfoot", which looked to me to be a very cut down java environment, which was pretty unsuitable.

Yet in other threads you've posted C# source.

In other words, you need to know what language you're using first. If you are unable to grasp that then you need to get someone local to sit down with you and talk to you about what you're trying to do because we're not getting anywhere at all.

We're happy to help, but you're really not helping yourself. I know you're young, and I think that right now you might need to mature a little before you take on a project of this size.
#9 - sun
no am not 27 i would tell you my age in a westill cruise if you ever come in there... Angry Angel your helpfull but i am using LFS_External_Client. am coding in the Form1.cs and i got some commands in there to...
Quote from sun :no am not 27 i would tell you my age in a westill cruise if you ever come in there...

Not sure how that's relevant. Your profile said 9 the last time I looked, your xfire says 27 and you're saying 27 here. Either way, I don't care, my comment still applies (in my opinion).

Quote from sun :i am using LFS_External_Client. am coding in the Form1.cs and i got some commands in there to...

You're using C# then, and the majority of the example that comes with LFS_External.

What you've asked in this thread is something that you can literally find within 5 seconds of googling;
http://www.google.co.uk/search ... amp;btnG=Search&meta=

Generally you'll find that people here are very, very willing to help out, but you've got to show some initative. I'm happy to help out with existing code you've got, but asking for very small, publically available snippets isn't the way to go. There's a lot of work in programming is reading source, or articles, and finding out how stuff works.
#11 - sun
yup cheers !
Quote from sun :no am not 27 i would tell you my age in a westill cruise if you ever come in there... Angry Angel your helpfull but i am using LFS_External_Client. am coding in the Form1.cs and i got some commands in there to...

As I said, I will point you towards some lessons.

OK, you are coding with the C# (C-Sharp) programming language, or more specifically Visual C#, which is a version of the language used with a special part of Windows called the .NET Framework. The .NET Framework provides programs with a safe environment to run, as well as a large library of pre-written solutions to many common programming problems. C# is a very popular language at the moment, as it allows programmers to write complex Windows applications quickly and easily, but it can also be used for anything from web sites to Xbox 360 games!

Microsoft provide good support for developers using their language, and you can find a portal to all sorts of Visual C# information on MSDN (Microsoft Developers Network):

Most interesting to you will be Microsoft's 'Beginning Visual C#' learning-center, which you can find here. The site includes download links to all the tools you will need, as well as simple introductory tutorials on how to start programming with the language, in addition to some very useful video lessons (the Absolute Beginners series), which are good for those of us who sometimes struggle to learn from words on a page.

Also a quick search on Google revels many thousands of results on learning C#.
#13 - sun
wow... Thanks
#14 - sun
Yer!

am making more commands now for my inSim and its going very well... But the only question is, that how would i get the money to show? i read angry angels comment but how do i look at the persons NPL packet or so ?
Semi OT:
Quote from sun :am making more commands now for my inSim

Argh! What's yours is the program that uses insim, not insim itself.

/grammar police
lol i keep calling every insim app "an insim"...It's habit now

@Bob, nice new shiny avatar
txt files.... eeesh... try MySQL.
Let him work with txt files since he is clearly learning to program still. Yes in the future MySQL should be used for more efficient searching and memory usage but for the sake of learning saving it to a text file will suffice. When you start getting 100s of entries in your text "database" then you will start to notice poor performance, although with lower numbers like 10-25 the text file should be fine to start with.

Doing it this way *may* mean you run into the possibility of needing to change how code works - but your learning and you should expect that.
I've been using txt files lately for all my databasing needs, and I find them much easier to work with than MySQL...they're readily-built into Visual C#, and they'll work on every server/PC...Although I haven't really had much entries put into 'em, so I can't say anything about performance...
Well the solution is to have a seperate class that handles all the storage for your program, then if you need to change your storage method you can simply rewrite the one class.
Quote from DarkTimes :Well the solution is to have a seperate class that handles all the storage for your program, then if you need to change your storage method you can simply rewrite the one class.

Agree with this 100%, ive made plenty of programs with MySql, all i do is make a simple class with methods and return types if needed. Keeps the program nice and simple and does what i need
Quote from DarkTimes :Well the solution is to have a seperate class that handles all the storage for your program, then if you need to change your storage method you can simply rewrite the one class.

exactly.

seriously though... text files for a database... that is MORE then scary

one wrong line in that file and POOF.. there goes your DB
Quote from teedot :exactly.

seriously though... text files for a database... that is MORE then scary

one wrong line in that file and POOF.. there goes your DB

I see a slight theory behind .txt files, but if i was making a big program id use MySql, the only thing i dont like about mysql is it uses a lot of resoruce's in the program when querying the database

Edit: Saying that, i might give Linq to MsSql a go and see what occours
Quote from mcgas001 :Agree with this 100%, ive made plenty of programs with MySql, all i do is make a simple class with methods and return types if needed. Keeps the program nice and simple and does what i need

Gets even more snazzy when you write a class to handle any SQL connection depending on a config setting as to the SQL DB type (e.g. PostegreSQL, MySQL, MsSQL, etc.) Getting it to translate some of the queries can be... 'fun' at times, though

As for being back on topic, SQLite is a nice, simple, server-less solution and works very tidily with most languages with any one of a number of decent libraries (I forget which one I'm currently using with .NET).
Quote from teedot :exactly.

seriously though... text files for a database... that is MORE then scary

one wrong line in that file and POOF.. there goes your DB

That's the main problem I have with txt files for storage, they invite the user to fiddle with them. Any time a user gets to fiddle, chaos ensues!

An alternative is to write the files in binary and give them an obscure file extension, then if you want to edit them you'll need to get out your hex editor .

Either that or use XML, when at least anyone editing them will have half an idea that there are rules governing how the data is stored. Plus any xml parser will have some nice exceptions you can catch so you can tell people ::MessageBox(NULL, "Oi, stop messing with me!", You're a N00B!", MB_OK | MB_ICONERROR);
1

FGED GREDG RDFGDR GSFDG