Hi all. I'm trying to write a script that basically finds the cheapest of a group of items on the mall and buys one of them. I'm not after specific items so much as I'm trying to learn the basics of scripting as I'm untrained and completely noob. Specifically, I'm using to use the buy() command to parse a variable and buy that item. Here's an example:
String buy_me="Twinkly Wad";
buy (1, buy_me);
That doesn't seem to work. It's as if the buy_me variable isn't being evaluated. I tried:
buy (1, $item[buy_me]); as well as
buy (1, $item[(buy_me)]);
I can replace the integer 1 with a variable and have the command work if I remove the string, for example:
int how_many=1;
buy (how_many, $item[Twinkly Wad]);
I really would like to learn how to pass the string variable into the buy command or learn a new method. I do have zlib.ash if that is important. If anyone can suggest something, I'd very much appreciate it.
String buy_me="Twinkly Wad";
buy (1, buy_me);
That doesn't seem to work. It's as if the buy_me variable isn't being evaluated. I tried:
buy (1, $item[buy_me]); as well as
buy (1, $item[(buy_me)]);
I can replace the integer 1 with a variable and have the command work if I remove the string, for example:
int how_many=1;
buy (how_many, $item[Twinkly Wad]);
I really would like to learn how to pass the string variable into the buy command or learn a new method. I do have zlib.ash if that is important. If anyone can suggest something, I'd very much appreciate it.