It is currently 18 Apr 2024, 00:06
   
Text Size

[fixed]Can't play draft - Mismatch Rarity.dat & cards.dat

Moderators: BAgate, drool66, Aswan jaguar, gmzombie, stassy, CCGHQ Admins

[fixed]Can't play draft - Mismatch Rarity.dat & cards.dat

Postby Blyfycyfyfyf » 12 Nov 2021, 17:29

I just downloaded "Proverbs, Myths & Fairy Tales v1.1 8cb1a18" and since I unpacked the files to my existing Manalink 3 location, I cannot play draft, I am getting the mentioned exception. Screenshot attached.

I have no custom mods, changes etc. apart of On previous version the draft was working correctly.

It happens no matter what packs and rariry mode I choose.
Attachments
screenshot.JPG
Last edited by drool66 on 23 Jan 2022, 17:01, edited 2 times in total.
Reason: fixed
Blyfycyfyfyf
 
Posts: 36
Joined: 12 Nov 2021, 12:10
Has thanked: 0 time
Been thanked: 0 time

Re: [confirm]Can't play draft - Mismatch Rarity.dat & cards.

Postby Aswan jaguar » 12 Nov 2021, 17:48

I confirm this bug. Something to do with foolosopher's new gui selector drool66?
EDIT: It happens also in current 3f87c76 commit.
Last edited by Aswan jaguar on 12 Nov 2021, 18:11, edited 1 time in total.
Reason: EDIT
---
Trying to squash some bugs and playtesting.
User avatar
Aswan jaguar
Super Tester Elite
 
Posts: 8078
Joined: 13 May 2010, 12:17
Has thanked: 730 times
Been thanked: 458 times

Re: [confirm]Can't play draft - Mismatch Rarity.dat & cards.

Postby Korath » 12 Nov 2021, 20:21

It's impossible for it not to give that message.
Code: Select all
   size_t tc = fread(&total_cards, 4, 1, f);
   if( total_cards != available_slots || tc != 4 ) {
      do_dialog(HUMAN, player, card, -1, -1, "Mismatch between Rarity.dat\nand cards.dat", 0);
      lose_the_game(HUMAN);
   }
fread() is asked to read one item, and then the popup happens if it doesn't claim to have read four.
man fread wrote:
Code: Select all
RETURN VALUE
       On  success,  fread()  and  fwrite() return the number of items read or
       written.  This number equals the number of bytes transferred only  when
       size  is 1.  If an error occurs, or the end of the file is reached, the
       return value is a short item count (or zero).
If that check somehow passed, it would inevitably go on to complain "Invalid Rarity.dat" for the exact same reason, then that "final fread failed for read_rarities()" for similar reasons (and also because |= doesn't mean inequality).
User avatar
Korath
DEVELOPER
 
Posts: 3707
Joined: 02 Jun 2013, 05:57
Has thanked: 496 times
Been thanked: 1106 times

Re: [confirm]Can't play draft - Mismatch Rarity.dat & cards.

Postby drool66 » 15 Nov 2021, 16:02

I fixed & stashed this a while ago when I included foolosopher's draftgui changes. I haven't committed them yet because the gui requires the user to download another package. I just did
Code: Select all
if( total_cards != available_slots || !tc )
...
if(!expansions || !exp)
...
if( !estc )
although the last one should probably be
Code: Select all
if( estc != total_cards )
There also need to be changes between lines ~750 and ~950 to get everything running.
User avatar
drool66
Programmer
 
Posts: 1163
Joined: 25 Nov 2010, 22:38
Has thanked: 186 times
Been thanked: 267 times

Re: [confirm]Can't play draft - Mismatch Rarity.dat & cards.

Postby drool66 » 23 Jan 2022, 17:00

Fixed since approx. 6566391
User avatar
drool66
Programmer
 
Posts: 1163
Joined: 25 Nov 2010, 22:38
Has thanked: 186 times
Been thanked: 267 times


Return to Archived Reports

Who is online

Users browsing this forum: No registered users and 27 guests


Who is online

In total there are 27 users online :: 0 registered, 0 hidden and 27 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 27 guests

Login Form