leprogrammer
Programmer
Hello.
I have a text file that looks like this:
It is called monster.txt
The first value is a id which I also use in my script.
Lets say I have the id 3, this would be "Spider" since the first number of "Spider" is 3
What is the best way to read the monster.txt file for the id and retrive the name? (Name = "Spider", id = 3) (As my example above)
I have a text file that looks like this:
Code:
0 1 "Bull Fighter" 6 100 0 16 20 6 0 28 6 3 0 1 5 400 1600 10 2 130 10 6 0 0 0 0 0
1 1 "Hound" 9 140 0 22 27 9 0 39 9 3 0 1 5 400 1600 10 2 130 10 6 0 0 0 0 0
2 1 "Budge Dragon" 4 60 0 10 13 3 0 18 3 3 0 1 4 400 2000 10 2 120 10 6 0 0 0 0 0
3 1 "Spider" 2 30 0 4 7 1 0 8 1 2 0 1 5 400 1800 10 2 120 10 6 0 0 0 0 0
It is called monster.txt
The first value is a id which I also use in my script.
Lets say I have the id 3, this would be "Spider" since the first number of "Spider" is 3
What is the best way to read the monster.txt file for the id and retrive the name? (Name = "Spider", id = 3) (As my example above)