loadsystem ini

08/22/2010 15:03 BLASTER!!!!#1
This would work as a proper load system?
I have tested it and works, but would it be fine?
Example for level and exp:
Code:
                    string CLevel;
                    CLevel = II.ReadString("Char", "Level");
                    C.Level = byte.Parse(CLevel);
                    string CExp;
                    CExp = II.ReadString("Char", "Experience");
                    C.Experience = ushort.Parse(CExp);
or what?

#edit

Im running into a problem.
How could I save/load the items if i do:
Save:
Code:
SW.WriteLine("Inventory=" + C.Inventory);
Load:
Code:
                    string CInv;
                    CInv = II.ReadString("Char", "Inventory");
                    //Load items here
or I should use a different methode?
08/23/2010 00:57 Basser#2
First of all, make this 1 line.
08/23/2010 09:59 BLASTER!!!!#3
1line? o.O
08/24/2010 14:07 devilsmum#4
Quote:
Originally Posted by Basser View Post
First of all, make this 1 line.
Could you calarify?
08/24/2010 14:16 µ~Xero~µ#5
example:

string CInv = II.ReadString("Char", "Inventory");

or:

Char.Inventory = II.ReadString("Char", "Inventory");


Depends on if u save the inv. as string