Variable passing question

S

senseihitokiri

Guest
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

Member
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.
 
Top