Trophy progress

For about the past week (since the newest update to KolMafia), when I try to run the script in the gCLI, I get:

"Expected ), found = (trophies.ash, line 289)".

Anyone else having this problem?
 
It is because of a change in mafia regarding comparisons. Edit the .ash file and change the = to == to fix the error.

The single = is for assignation, not for comparisons.
 
Either I can't get it to work, or you have a bug:

> call /Users/DaMaster0/Library/Application Support/KoLmafia/scripts/trophies.ash

Expected ), found = (trophies.ash, line 289)
 
You'll see someone else complaining about the same problem 2 posts above your own and the answer given in the post right above yours. ;)

This is a common problem with older un-updated scripts since a change to kolMafia on April 19.
 
Last edited:
I've found another typeo at line 366:

PrintProgress("Failure to Communicate",food_consumed[$item[lucky surprise egg]],50);

The trophy requires 50 eggs to be eaten, not 5. Thought it was strange that it claimed I had a trophy available I didn't notice...
 
if you are looking to fix the

Expected ), found = (trophies.ash, line 289)

problem, but don't want to count the lines to 289, the line you want is ....

if (trophies[award] == true)
 
Trying to get this to work, but none of the trophies that I need show I have made any progress towards getting them.

I Heart Canadia (0%) but I've drank 23 white canadians
Failure to Communicate (0%) but I've eaten 14 Lucky Surprise Eggs.
Journeyman Meatsmaker (0%) but I've got 55 meatsmithing recipes.

There may be others, as every trophy that it says I need all say 0%, but I haven't actually checked my current progress on any others. This would be a great script if I could get it to work.
 
Trying to get this to work, but none of the trophies that I need show I have made any progress towards getting them.

I was having the same problem, there must've been a change in Mafia at some point. To fix this problem, open up the file, scroll to the function PrintProgressNote(...) and replace this line
Code:
float pct = current/needed;
with this line
Code:
float pct = to_float(current)/to_float(needed);
 
Trophy status

Since I've found it a big pain to check all my trophies (instead of just the consumption ones), I've made significant changes to the base script in this thread to now check against all known trophies. A couple things it does:

-Only hits the server once to grab the trophycase page
-Checks against all trophies
-Provides a complete, color coded listed of haves vs. missing
-Provides a summary of total number have vs missing

Note it DOES NOT show any type of 'progress' towards consumption trophies.

The trophies are hardcoded into the script unfortunately, so we'll need to update it as new ones are released.

Hope everyone finds this as helpful as I do!

Version 1.0
Version 1.1 - Fixed This Lousy/Stupid Trophy name
 

Attachments

Last edited:
Neat script. One problem I noticed:
It doesn't detect trophy 27. It's called This Lousy Trophy in the trophy hut, but it's called This Stupid Trophy in the trophy case. I have the trophy, but it's saying that I'm missing This Lousy Trophy.
 
Neat script. One problem I noticed:
It doesn't detect trophy 27. It's called This Lousy Trophy in the trophy hut, but it's called This Stupid Trophy in the trophy case. I have the trophy, but it's saying that I'm missing This Lousy Trophy.

Thanks for the feedback. I've fixed this issue and updated the script to version 1.1
 
Error message after loading script:

Expected ), found = (trophies.ash, line 289)

FIXED. I went back into this thread's history. GASP! ;)
 
Last edited:
Updated the trophies.ash to validate. And not have those aggravating $type[""] checks anymore. Note that trophies is based on a 2008 file, and TrophyCheck is newer from 2010.
 

Attachments

I've updated this script to include suggested fixes from posts #25 (camperdave) and #28 (divergentdave).
I also fixed an issue with trophy #72 "Melon Baller, Shot Caller" which was not detected properly when completed due to a typo ('Mellon' instead of 'Melon').

I still have issues with:
  • Incorrect display of text next to progress bars (inconsistent line breaks)
  • Error message: "The string "1" is not an integer; returning 1 (consumption.ash, line 10)"
I'm not sure how to fix those so I'll keep it as is for now.

View attachment trophies.ash
 
Back
Top