Okay, I've now laid out the arrays in this manner:
Array 1 contains two arrays (Array 2 and Array 3). One contains valid equip types. the other contains valid armor types.
Array 2 contains the multiple main weapon groups (sword axe etc). And contains the various weapon subgroups. (short sword, long sword etc. would be under the sword group.) (the subgroups are arrays)
Array 3 contains the multiple main armor groups (armor, accessories, etc). In this array are more arrays containing the various armor subgroups.
I've somehow managed to end up with this:
PHP Code:
function doCheckType(array, equiptype){
for (temp.array[0] : array)
if(equiptype in array[0]){player.chat = "Weapon!";break;}
elseif(equiptype in array[1]){player.chat = "Armor!";break;}
else{
player.chat = "Item Error!";
sendtorc(player.account SPC "has encountered an item error! Invalid item type:" SPC equiptype[0] @".");break;
}
player.chat = array;//for testing
}
One of my main problems is that once i do this once, for some reason, it wrecks my arrays. in which i mean that it makes everything null after the first use. One of my problems here is that I likely am still having trouble figuring out this for loop thing (I have no clue what ":" means in that. and might might as well add: I have no clue what some of these other symbols mean like "?" when used in this way. And theres no real list anywhere that I know of.)
edit:Actually, I could probably figure the rest of this out myself if i could explicitly understand how for loops work. Since it's absolutely
impossible to search for this myself, what with the fact that 3 letter words are ignored by the search feature, and the graalbible nets you hundreds of unrelated results, does anyone have like a link on a tutorial on this or something? º_o;