gogodr I post too much
Reputation: 125
Joined: 19 Dec 2006 Posts: 2041
|
Posted: Sat Nov 21, 2009 12:52 pm Post subject: this gave me a headache |
|
|
had to fix the code like 10 times XP It was always missing something
| Code: | void FixNames()
{
int x, y, z, a, h, m;
y = Equips.Length;
z = ActionBar.Length;
a = CharactersAlliance.Length;
h = CharactersHorde.Length;
m = CharactersMonster.Length;
char[] xnb = { 'b', 'n', 'x', '.' };
for (x = 1; x < y; x++)
{
Equips[x] = Path.GetFileName(Equips[x]);
Equips[x] = Equips[x].TrimEnd(xnb);
}
for (x = 1; x < z; x++)
{
ActionBar[x] = Path.GetFileName(ActionBar[x]);
ActionBar[x] = ActionBar[x].TrimEnd(xnb);
}
for (x = 1; x < a; x++)
{
CharactersAlliance[x] = Path.GetFileName(CharactersAlliance[x]);
CharactersAlliance[x] = CharactersAlliance[x].TrimEnd(xnb);
}
for (x = 1; x < h; x++)
{
CharactersHorde[x] = Path.GetFileName(CharactersHorde[x]);
CharactersHorde[x] = CharactersHorde[x].TrimEnd(xnb);
}
for (x = 1; x < m; x++)
{
CharactersMonster[x] = Path.GetFileName(CharactersMonster[x]);
CharactersMonster[x] = CharactersMonster[x].TrimEnd(xnb);
}
} |
|
|