Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //This is the 1st try at keeping skills as an object array.
- // the (new) paste is better beacuse it makes the code a lot simplet
- // and makes it a lot more readable.
- static Object[,] skillz = { { "appraise", "balance", "bluff" }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { "int", "dex", "cha" }, { true, false, false } };
- static public void skillNewMethod()
- {
- string myString = "";
- for (int y = 0; y < skillz.GetLength(1); y++)
- {
- for (int x = 0; x < skillz.GetLength(0); x++)
- {
- string a = "";
- int b = 0;
- bool c = false;
- if (x == 0 || x == 5)
- {
- a = (string)skillz[x, y];
- myString = myString + " " + a;
- }
- else if (x != 6)
- {
- b = (int)skillz[x, y];
- myString = myString + " " + Convert.ToString(b);
- }
- else
- {
- c = (bool)skillz[x, y];
- myString = myString + " " + Convert.ToString(c);
- }
- }
- Console.WriteLine(myString);
- myString = "";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment