PDA

View Full Version : Variable passing question



senseihitokiri
05-12-2006, 07:25 PM
Hey guys/gals, I was just wondering if someone could answer this for me:

What's the proper syntax (if supported) for passing a special-type variable such as $item. Technically it's not the sending I'm worrying about, it's the receiving.

void funcName ( int amount, $item[] ) <--?

Tirian
05-12-2006, 07:29 PM
that would be

void funcName (int amount, item it)
{
...
}

item is the variable type, and $item[...] is a built-in function that returns an item. Similarly for location, class, stat, skill, slot, zodiac, and maybe one or two others that I can't remember off the top of my head. Check out the ASH reference at http://kolmafia.sourceforge.net/manual.html for more specific details.