// Items Database |
Many thanks apreaciated. If you know an alternate method like in PHP I'd like that too.
ID:163117
Oct 9 2007, 9:12 am
|
||
I need to create a utility for myself, I want to import a rather.. LARGE text file containing rows of information handled in another format. I want to include it and organize it just like any other thing. some of you may actually be aware of what file this is and what its used for. Here's an example of the top.
Many thanks apreaciated. If you know an alternate method like in PHP I'd like that too. | ||
#1 Oct 9 2007, 11:00 am
|
||
Make lists
| ||
#2 Oct 9 2007, 11:05 am
|
|||
I highly recommend Deadron's XML library for this. Unless you are strict about using text files, that'd be the way to go.
IF you are strict, you'd want to parse the text file. Here are the barebones:
The code assumes your text file format is similar to this:
Edit: Oh, in-case you follow my example, you'd want to import the potions into a global list and reuse it at server startup, instead of re-importing potions for every client every time. | |||
DivineO'peanut wrote:
I highly recommend Deadron's XML library for this. Unless you are strict about using text files, that'd be the way to go. they aren't really a potion text file, But Ill try and see what happens. | |||
This is the format. | ||
This is my edit, apparently it doesn't want to work to well. (I found my problem :D Silly me.) EDIT | ||
#6 Oct 9 2007, 4:28 pm
|
|
You shouldn't really rip other's hard work.
I can clearly tell that's Gravity's Ragnarok Online stuff. | |
LucifersHellion wrote:
You shouldn't really rip other's hard work. IF you didn't read. IM using it for personal reasons, I need a tool to organize and search through this massive text file. I'ts not going to be used as a game or no others are using it. It's just a utility I need to use. On side not this is a piece of a server emulation and no the real thing. however the original concept and creation does goto Gravity. | |
Gravity is far from the first group to make a database using text strings, there's no such thing as copyrighting the format of text, you don't need to give anyone credit.
| |
Keeth wrote:
Gravity is far from the first group to make a database using text strings, there's no such thing as copyrighting the format of text, you don't need to give anyone credit. I understand that. IT is their work and many others for storing such data into a text file. But my current objective at the moment is to solve my issue with my current script, each line is handled and dealt with but I have nothing to stop them. the ';' as suggested would not work.
| ||