is there a way to see what a function within zlib returns?

I'm trying to see what a function returns from zlib, specifically best_fam("item") because another script uses it and it seems to return a 1 weight grouper over a max weight slimeling and I can't understand why. Before I delve deeper into how it makes this determination, I want to be sure I've got the right function and that it's returning what I think.

Is there a way from the CLI to directly call this function and see what it returns?
 

slyz

Developer
in the gCLI:
Code:
ashq import "zlib.ash"; best_fam( "item" ).print();

You can even alias it.
 
Thanks, was so close on my tries, but neglected to import zlib. very nice.

edit: ok so here's a dumb question. it works when i alias

Code:
alias bfam => ashq import "zlib.ash"; best_fam( "item" ).print();

but i dont always want to check it for items. i tried a number of things, but can't seem to get it to accept/use a variable. i am guessing it's a syntax thing, but how do i do that correctly?
 
Last edited:

slyz

Developer
Code:
alias bfam => ashq import "zlib.ash"; best_fam( "%%" ).print();

Code:
> bfam stat

Running ZLib version: r30
Finding best familiar of type "stat "...
First match for type "stat ": Baby Sandworm
Baby Sandworm
 
thanks again. was really close but thought i had to declare the data type for the variable, i didn't realize %% would just work on it's own.

for the record, zlib is either not detecting my slimeling or it thinks the grouper is better for some reason. i'll try to dig to see if i can figure out which/why.

edit: Eureka! i think it's because the slimeling is not in his best_familiars mapping here
 
Last edited:

slyz

Developer
The slimeling isn't in zlib's bestfamiliars.txt data file. You should take that to the zlib thread if you want zarqon to notice, though.
 
ahh yes, i presume that file updates from the best_familiars mapping somehow? maybe? anyway, i've posted in zlib thread to highlight it. i can manually add slimeling to my own bestfamiliars.txt for now.

Thanks for the help!
 
Top