The online racing simulator
Database
(9 posts, started )
#1 - sun
Database
Hi !

i've done a little more on my script but how would i get the money to show on my cruise server ? do i need to add a code somthing ? please help ? and if therre is a code, could you give it me ? Thanks Owen s2 Licenced.
This isn't just a simple few lines of code. You've got to think about what you're doing, I'm afraid.
As T.A.A. said this isnt just a few lines of code you pretty much have to build the whole program with the database in mind.
#4 - sun
ahh ok... How ?
Its not as easy as "How" there isnt enough space on this forum too explain how!
Ok, money.

First you need to decide how a person gets money. We'll call this the 'act of levelling'.

You need some form of storing data. This could be an actual database engine written by someone else, or write your own method of storage. You need to come up with a data structure that will work well for your method of 'levelling'

When a player joins the server you look at the NCN or NPL packet and then check the database to see if you know them. If you do, load their data into memory from the db. If not make a new record. The loaded data is your cache. Now you need to subscribe to the relevant packets you decided that are applicable for 'money' to be gained and update the cache. When a player leaves update the database with the data in the cache.

It's not 100% there as you're sort of asking "how do I use butter", but putting a cow in front of us.

Not my best analogy I know, but it's the best I can come up with at the moment.
#7 - sun
Hi

Thanks angry angel that was really usefull info there... atm am learning how to code in greenfoot http://www.greenfoot.org. It is really good the proggram i made al sorts of fun games and stuff. its called Teach your kids how to code. lol it sounds kind of weird but its good. Thanks i'll try that, to see if i get money on my server Thanks again ! Owen s2 Licenced.
Quote from the_angry_angel :Ok, money.

First you need to decide how a person gets money. We'll call this the 'act of levelling'.

You need some form of storing data. This could be an actual database engine written by someone else, or write your own method of storage. You need to come up with a data structure that will work well for your method of 'levelling'

When a player joins the server you look at the NCN or NPL packet and then check the database to see if you know them. If you do, load their data into memory from the db. If not make a new record. The loaded data is your cache. Now you need to subscribe to the relevant packets you decided that are applicable for 'money' to be gained and update the cache. When a player leaves update the database with the data in the cache.

It's not 100% there as you're sort of asking "how do I use butter", but putting a cow in front of us.

Not my best analogy I know, but it's the best I can come up with at the moment.

You gotta tell me where you get this patience pills, I could really use some of them when interviewing our customers and finding out they dont have a f-clue what they really want.
Quote from BurnOut69 :You gotta tell me where you get this patience pills, I could really use some of them when interviewing our customers and finding out they dont have a f-clue what they really want.

Nearly 4 years ago I started working in my chosen career. At that point I'd never actually had to deal with what people in my position often call "users". Unfortunately because these users were also paying customers I've had to train myself to be patient with them and try and figure out what people often want. Sadly I'm silly a very angry person and what I write or say in public and what I say in private are often 2 different things

Database
(9 posts, started )
FGED GREDG RDFGDR GSFDG