Hello, i’m confused because i’m working from many hours on 1 game
I created 2 Arrays, and 2 variable, and i need scan 1 array to find there my 1 variable, and save table number where it was to second variable. After that i need compare this variable with number of table, with second Array, to get content of table from this array [table id = number of 2 variable]
Then as i said i have 2 variables:
public int a = 26;
public int b = 0; //Here i want save id of table where i will find number from var a :smile:
Here are first array:
public int[][] dmgTBL = {
new int[] {1,2,3,34,33,32},
new int[] {4,5,6,7,8,31,30,29,28},
new int[] {9,10,11,27,26,25},
new int[] {12,13,14,15,24,23,22,21},
new int[] {16,17,20,19},
new int[] {18}
};
Then i need search /\ this array to find there number from int a, it’s 26 for now. After find i want save id of table where it was, for example /\ 26 is in table with id 2, cuz if i will open this number i could use:
dmgTBL[2][4] << this is my number “26”, then i want save to var b number of table, in this case this number is “2”
ok then when i will have that i want get from this [second] array /
public int[][] dmg = {
new int[] {1,10},
new int[] {11,30},
new int[] {40,50},
new int[] {60,90},
new int[] {100,150},
new int[] {300}
};
content of this array [from table with id from var b, as we get this id from first array, its 2 in this case, cuz resoult should be {40,50}
Thanks for help and sorry for my bad english.