ZLib -- Zarqon's useful function library

zarqon

Well-known member
What does is_unrestricted do? It's not on the ASH wiki.

Am I correct in assuming that this function could basically replace be_good()? Or is there something be_good() does that is_unrestricted doesn't check?
 

lostcalpolydude

Developer
Staff member
is_unrestricted() only checks type69 limitations if you are in the current challenge path, and trendy limitations if you are in that path.
 

zarqon

Well-known member
Thanks lost. r22 checks is_unrestricted() at the end of be_good(). Also thanks Theraze for suggesting the improvement.
 

freebase

New member
im getting this error when trying to adventure in the kitchen.

[117] The Haunted Kitchen
Encounter: zombie chef
Strategy: C:\Documents and Settings\default\My Documents\Downloads\ccs\freebase.ccs [default]
Round 0: freebase loses initiative!
Expression syntax errors for 'modifier_eval()':
Can't understand dmg*2 (zlib.ash, line 186)
Round 1: freebase casts ENTANGLING NOODLES!
Round 2: freebase casts CANNELLONI CANNON!
Round 3: zombie chef takes 37 damage.
Round 3: freebase wins the fight!
You gain 19 Meat
You acquire an item: fricasseed brains
You gain 1 Strongness
You gain 4 Magicalness
You gain 2 Smarm



thanks for any insight.
 

Winterbay

Active member
What is your CCS? Could you try it with a higher verbosity to see if you get more printout regarding what was passed to modifier_eval?
 

Make it again!

New member
Hi. I'm also getting this error (while running One-click Wossname):
Expression syntax errors for 'modifier_eval()':
Can't understand dmg*2 (zlib.ash, line 186)

Here is my CCS (made a blank one for testing):

[ default ]
consult SmartStasis.ash
special action
attack with weapon


Here is the output of svn update:
Updating all SVN projects...
bale-counterchecker is at HEAD (r16)
batbrain is at HEAD (r47)
bestbetweenbattle is at HEAD (r18)
smartstasis is at HEAD (r17)
zlib is at HEAD (r22)
Requests complete.


Mafia v16.4 build r14830.

Any suggestions what I should do?
 

fronobulax

Developer
Staff member
What familiar are you using? I seem to recall there are some scripts that don't work well with something - mosquito? - and the symptom is an unrecognized modifier. When it was last discussed my recollection is that there were pretty compelling reasons why it was unlikely to be fixed, but then I remember things that did not happen.
 

zarqon

Well-known member
That's a BatBrain bug that has been reported periodically. However, I figured it out today and fixed it.

EDIT: r23 Update splits be_good() into four versions: familiar, skill, item, and string. Now we can call the correct version of is_trendy() and is_unrestricted() depending on the johnny sent to be_good(). It turns out this definitely matters -- try checking is_trendy($skill[Summon Dice]) vs. is_trendy("Summon Dice") and you'll see what I mean. Also we can tailor our checks a bit better.
 
Last edited:

Make it again!

New member
Hooray!

(After updating I got the same error, but then I deleted batfactors.txt and restarted Mafia and the error was gone. I was indeed using an Adorable Seal Larva.)
 
Last edited:

Cool12309

Member
That error is back, and has been for about a week (possibly longer but I was in aftercore). I'm doing a 100% imitation crab run.

This shows up at the end of every page load in combat, twice if I have an autoattack that kills the monster.

Code:
Expression syntax errors for 'modifier_eval()':
Expected ,, found
Unexpected end of expr
Expected ), found (zlib.ash, line 186)

This is when using WHAM. Any ideas?
 
Last edited:

Theraze

Active member
Someone made a bad entry in batfactors. Bad input isn't a zlib problem. Give more information about what skills you're using, what familiar you have out, any special equipment that might be providing skills or stats, etc...
 

Xenthes

Member
I am getting the same thing. How do you set the verbosity to 10 again? It has been way too long sine I had to mess with that.
 

Montheo

New member
I am receiving the follosing error. I assume it is being called from WHAM, but I know nothing.

Code:
Expression syntax errors for 'modifier_eval()':
Can't understand songduration-10)/3
Expected ), found (zlib.ash, line 186)
You're on your own, partner.
Click here to continue in the relay browser.
 
Last edited by a moderator:

Bale

Minion
Looks like a BatBrain issue (called by WHAM) caused by an odd interaction of batfactors and your current equipment. I'm not used to that error. Just to iron out a couple of simple problems, please copy/paste the following three lines into your CLI and copy/paste the response.

  • version
  • svn update
  • wear
 

Winterbay

Active member
Well... The only thing in batfactors that use that line is "accordion bash" so if you want to get around it quickly unequip your accordion. THis is however not an optimal solution but in order to debug it further more info is needed such as a run of WHAM with verbosity of 11 or so...
 

Montheo

New member
Code:
> version

KoLmafia v16.7 r15085
Requests complete.
> svn update

Updating all SVN projects...
zekaonar-0-PVPBestGear is at HEAD (r7)
therazekolmafia-canadv is at HEAD (r46)
bale-new-life is at HEAD (r30)
eodscascension-0 is at HEAD (r52)
therazekolmafia-thesea is at HEAD (r39)
mafiachit is at HEAD (r196)
Validating repo...
Repo validated.
Updating mafiarecovery...
svn: E155004: Working copy '/home/smasherton/.kolmafia/svn/mafiarecovery' locked
Done.
mafia-harvest-data is at HEAD (r4)
winterbay-mafia-farm is at HEAD (r16)
rlbond86-mafia-scripts-auto_mushroom-trunk is at HEAD (r37)
bale-ocd is at HEAD (r28)
winterbay-mafia-sushi is at HEAD (r4)
wrldwzrd89-mafia-scripts-trunk-pandamonium-quest is at HEAD (r7)
Validating repo...
Repo validated.
Updating bumcheekascend-bumcheekascend...
svn: E155004: There are unfinished work items in '/home/smasherton/.kolmafia/svn/bumcheekascend-bumcheekascend'; run 'svn cleanup' first.
Done.
slimetube is at HEAD (r7)
psychoseamatic is at HEAD (r12)
bumcheekascend-bumpork is at HEAD (r544)
winterbay-mafia-autobasement is at HEAD (r34)
slyz-nemesis is at HEAD (r5)
bestbetweenbattle is at HEAD (r18)
clilinks is at HEAD (r5)
guyymafia-porkfuture is at HEAD (r160)
rlbond86-mafia-scripts-enhanced_inventory_spoilers-trunk is at HEAD (r37)
fluxxdog-coding-trunk-superdrinks is at HEAD (r8)
bumcheekascend-snapshot is at HEAD (r544)
batbrain is at HEAD (r50)
formhtml is at HEAD (r1)
winterbay-mafia-wham is at HEAD (r41)
autobhh is at HEAD (r1)
bale-counterchecker is at HEAD (r17)
smartstasis is at HEAD (r17)
zlib is at HEAD (r23)
Validating repo...
Repo validated.
Updating therazekolmafia-eatdrink...
svn: E155004: There are unfinished work items in '/home/smasherton/.kolmafia/svn/therazekolmafia-eatdrink'; run 'svn cleanup' first.
Done.
Ezandora-Guide-branches-Release is at HEAD (r219)
Checking for working copy modifications...
svn: E155032: Pristine text not found
Requests complete.

> wear

Hat: Hairpiece On Fire
Weapon: Shakespeare's Sister's Accordion
Off-hand: Half a Purse
Shirt: cane-mail shirt
Pants: stainless steel slacks
Container: Cloak of Dire Shadows

Acc. 1: droll monocle
Acc. 2: plaid pocket square
Acc. 3: plaid pocket square

Pet: Grimstone Golem (35 lbs)
Item: grimstone galoshes
 
Top