fieryhenry / BCSFE-Python

A python save editor for the mobile game The Battle Cats
MIT License
126 stars 17 forks source link

Save data parsing error 20518 #6

Closed AleZaTar closed 2 years ago

AleZaTar commented 2 years ago

Hello again! There is an error occured when I cleared the first chapter and tried to edit items (normal tickets). Here what it says: Error: An error has occurred while parsing your save data (address = 20518): Traceback (most recent call last): File "C:\Users\Alexander\AppData\Roaming\Python\Python310\site-packages\BCSFE_Python\parse_save.py", line 1457, in start_parse save_stats = parse_save(save_data, country_code) File "C:\Users\Alexander\AppData\Roaming\Python\Python310\site-packages\BCSFE_Python\parse_save.py", line 1608, in parse_save current_sel = get_event_stages_current() File "C:\Users\Alexander\AppData\Roaming\Python\Python310\site-packages\BCSFE_Python\parse_save.py", line 223, in get_event_stages_current clear_progress = list(helper.chunks(clear_progress, stars_per_sub_chapter)) File "C:\Users\Alexander\AppData\Roaming\Python\Python310\site-packages\BCSFE_Python\helper.py", line 161, in chunks for i in range(0, len(lst), chunk_len): ValueError: range() arg 3 must not be zero

Save_data.zip

fieryhenry commented 2 years ago

I don't seem to get the error with the provided save file, are you using the latest editor version?

AleZaTar commented 2 years ago

I don't seem to get the error with the provided save file, are you using the latest editor version?

Yes

fieryhenry commented 2 years ago

So if you use the saves given in the zip file, they don't work?

AleZaTar commented 2 years ago

I tried it out again and the same error happened for me. I deleted the back up saves and generated new ones BCSaveEditor.zip

fieryhenry commented 2 years ago

Still, I don't have the issue, can you try to run this command py -m pip install -U battle-cats-save-editor and retry

AleZaTar commented 2 years ago

Sorry for taking me too long to respond, but I think I solved the problem. Though it's very weird and funny, as if the program is sorta religious and feels offended: the error happens ONLY when the input for normal tickets is 666. I spontaneously and lazily entered this number in order to have many tickets without any second thoughts. It is still happening with the last update too. Anyway, thank you for your help!

fieryhenry commented 2 years ago

Oh, I just found out why, it's because the current number of cats in the game is 666 atm, so it happened to break one piece of code, I'll fix for the next release

fieryhenry commented 2 years ago

This should be fixed in the latest release