ZLib -- Zarqon's useful function library

I'm a total n00b to this, but I can't get any of the scripts that require ZLib to work. They all give the same error message:

"desert bus pass" (zlib.ash, line 394)

I have the newest version of zlib and mafia. Any ideas?
 
update clear

or please explain how your question is different from the one posted above?

I agree it would be nicer if the search returned individual posts and not just the topic but...
 
I'm sorry - I wasn't sure if any of those answers went to that specific question or not. I did see it, but all I really saw for a response was to make sure I was using the lastest build and latest version of the script (unless I'm misreading?). And so I did those things, but no fix.

I don't know what "update clear" means... I apologize for my ignorance, but any more specific help would be fabulous. :-)

Thanks!
 
@Doodle: I actually don't skip the wait for relay scripts. There's no detection in check_version() for whether it's in a relay script or not (don't think it's possible to detect that). The wait is reduced to just 1 second after the initial notification though. Hopefully the wait() CLI printout will be restored so you can see better what's going on.

That's a very good point about id vs. class. That will be in the next update, which should be sooner rather than later so people don't need to rewrite too much.
 
I was going to say that you could have it check for a zlib variable, but since you can't change that BEFORE import I guess that wouldn't work either... hmm... maybe one of the various get_path() related functions?

Edit; since dif. behavior for zlib's check_version() is such a PITA, I was wondering about the whole id vs class thing... then I realized it's still possible to have more than one script calling said function beyond zlib. It's been a long day (you try figuring out KoL's f***'d up table nesting & using regex to insert javascript at proper places... oh wait, you have. :P ).

EDIT TO ADD:

Feature request: zlib helps keep a nice, clean separation between script settings and mafia settings. EXCEPT when it comes to daily settings. I was wondering if you've ever given this some thought. I imagine the easiest solution would involve a single mafia setting along the line of "_zlib_daily_settings" or some such. The part that worries me is coding it in such a way as not to break existing scripts; but if you could pull of that miracle, it would be fantastic!
 
Last edited:
@Theraze: This one uses has_goal() to figure out the best location to get the specified item:
PHP:
alias goget => conditions clear; conditions add 1 %%; ashq import <zlib.ash> float bestrate; location bestloc; foreach l in $locations[] if (has_goal(l) > bestrate) { bestrate = has_goal(l); bestloc = l; } if (bestrate > 0) obtain(1, "%%", bestloc); else print("No monsters drop this item.");

Problem is today I was trying to get me one more ketchup for finishing up appetite on a new BM ascend, and got this:
> wheretofind antique packet

The following monsters drop antique packet of ketchup:
Possessed Silverware Drawer found in Haunted Kitchen

> goget antique packet

Conditions list cleared.
Condition added: antique packet of ketchup
antique packet of ketchup
No monsters drop this item.

> alias goget => ashq import <zlib.ash> location[monster] locs; foreach l in $locations[] foreach num,m in get_monsters(l) foreach i in item_drops(m) if (i == to_item("%%")) locs[m] = l; foreach m in locs obtain(1, "%%", locs[m]);

String successfully aliased.
goget => ashq import <zlib.ash> location[monster] locs; foreach l in $locations[] foreach num,m in get_monsters(l) foreach i in item_drops(m) if (i == to_item("%%")) locs[m] = l; foreach m in locs obtain(1, "%%", locs[m]);

> goget antique packet

You need 1 more antique packet of ketchup to continue.
Conditions list cleared.
Condition added: antique packet of ketchup
antique packet of ketchup

Request 1 of 24 (Manor1: Haunted Kitchen) in progress...

Long as I was using the has_goal alias, it couldn't find where to do it, though wheretofind and my (former) alias both knew where to go...
 
I'm a total n00b to this, but I can't get any of the scripts that require ZLib to work. They all give the same error message:

"desert bus pass" (zlib.ash, line 394)

I have the newest version of zlib and mafia. Any ideas?

I'm having this same problem, even with the newest versions of mafia and zlib... And even after doing an update clear.
 
I'm having this same problem, even with the newest versions of mafia and zlib... And even after doing an update clear.

What do you mean by newest version of Mafia? Is that the daily builds or the latest version spin? (those are quite different)
 
Problem is today I was trying to get me one more ketchup for finishing up appetite on a new BM ascend, and got this:
It just happens that Mafia has no drop rate for the antique packet of ketchup: item_drops_array($monster[Possessed Silverware Drawer]) will show that antique packet of ketchup is of type "0". It's the only type that zlib's has_goal(monster m) doesn't account for. I really don't know what assumptions could be made (maybe return a negative rate and let the calling function deal with the answer?).
 
Yeah... if there's no rate given, I'd rather it use an unknown rate as a possibility rather then crashing out and saying it's impossible. If anything is better than 0/known, use that... if all/only unknown? Go for it...
 
Alright... I am having the same issue and I have not found a fix for it. I has pictures to go along, like a child's book.

Alright, so I have the latest version, r8714. I have done the "update clear" to no avail, twice, and still it comes up with the same error as above.

Captur3.jpg

(Line 394)

The same error that shows up every farging time... So I went into the ASH file and after an hour of modification before I figured out I can use notepad++, I got annoyed with modifying and the 30+ other errors it made up, and decided that this is the source of my life's grief:

Capture-1.jpg

(Lines 390-400)

Seriously, every time I try to kick this thing up, it gives me the same error, and I know that it is not the build of KoLMafia, since I just got the newest build not 20 minutes ago. I'm still a newbie scriptor, so any insight into this would be Über helpful.

((Pardon my formatting, I have about four minutes to do this before a doctors appointment.))
 
The .exe file isn't being updated right now. The latest version is actually 8779, so you'll need to use a .jar file. Just drop it in where you normally put the .exe file and run it.
 
Also -- relay scripts should be run from the relay browser, not the CLI. They won't do much of anything being run from the CLI. Open your relay browser and look for the dropdown menu of relay scripts at the right of the top menu.
 
Back
Top