Hi.
First off: I'm trying to expand my knowledge of maps. I have very limited experience with C and C++ from a while back (I passed intro to computer programming/C++ in jr. college with a C seven years ago), but this ASH stuff doesn't seem too difficult. I've found a number of already-written ash files that would do what I want to do (with personal tweaking), but my goal is to create the basic file myself. That, and no matter how hard I tried to pick them apart, I wasn't ever completely successful to get the file to do exactly what I wanted.
So, all that being said, this is what I am trying to do:
I want to make an inventory clean up script. I have a text file for the map with the number of items I want to keep, the item name, and what I want to do with it, all separated with a tab like this:
I want to sell all Arrrmetia cards in the mall, pulverize all but one of my aprons, and sell all but one crossbow.
Now, the problem is this: maps hate me. Or better put, my brain hates maps. I know the vague idea behind maps, but I've never understood them. I know that once I pull out the various values for each line, I have the capacity of writing the code to dispose of the item properly. I just don't get the maps...
Now, I'm thinking of having the code do something like this:
where value1 and value2 are the first two parts of that map thingy.
Sorry, my terminology sucks
I could rewrite all this stuff with cli_executes and whatnot, but I really want to learn maps, and I've already created the humongous file of crap I want to deal with. If there is a simple way to explain this, I would be most grateful. I'm hoping it's just a simple deal with learning the commands to pull the various values out of the map... Hopefully.
Thanks in advance.
First off: I'm trying to expand my knowledge of maps. I have very limited experience with C and C++ from a while back (I passed intro to computer programming/C++ in jr. college with a C seven years ago), but this ASH stuff doesn't seem too difficult. I've found a number of already-written ash files that would do what I want to do (with personal tweaking), but my goal is to create the basic file myself. That, and no matter how hard I tried to pick them apart, I wasn't ever completely successful to get the file to do exactly what I wanted.

So, all that being said, this is what I am trying to do:
I want to make an inventory clean up script. I have a text file for the map with the number of items I want to keep, the item name, and what I want to do with it, all separated with a tab like this:
Code:
0 Arrrmetia trading card mallsell
1 asbestos apron pulv
1 asbestos crossbow autosell
Now, the problem is this: maps hate me. Or better put, my brain hates maps. I know the vague idea behind maps, but I've never understood them. I know that once I pull out the various values for each line, I have the capacity of writing the code to dispose of the item properly. I just don't get the maps...

Now, I'm thinking of having the code do something like this:
Code:
if (value3 of map[1] == "mallsell")
mallsellfunc(int value1, item value2);
Sorry, my terminology sucks

I could rewrite all this stuff with cli_executes and whatnot, but I really want to learn maps, and I've already created the humongous file of crap I want to deal with. If there is a simple way to explain this, I would be most grateful. I'm hoping it's just a simple deal with learning the commands to pull the various values out of the map... Hopefully.
Thanks in advance.