xNul / palworld-host-save-fix

Fixes the bug which forces a player to create a new character when they already have a save. Useful for migrating maps from co-op to dedicated servers and from one dedicated server to another.
MIT License
887 stars 69 forks source link

invalid syntax error #46

Closed jordachemac closed 6 months ago

jordachemac commented 7 months ago

I have got the temporary copy of the save folder and followed the usage instructions but when I try to execute the script I get an invalid syntax error

PS C:\Users\John\Documents\Palworld> python fix-host-save.py "C:\Users\John\.cargo\bin\uesave.exe" "C:\Users\John\Documents\Palworld\CDEDB7914209AA4B3CDB30B19E977A77" 7B014718000000000000000000000000 E8C70342000000000000000000000000
  File "fix-host-save.py", line 146
    print(f'File {file} is not a save file, found {magic_bytes} instead of P1Z')

Following the format python fix-host-save.py <uesave.exe> <save_path> <new_guid> <old_guid>

xNul commented 7 months ago

Looks like we're still missing the bottom half of the error, but from what I can see, I think this is due to installing the wrong version of Python (it should be Python 3)? Not sure. Your command looks good though!

xNul commented 7 months ago

Btw, if you're no longer working on this, please let me know so I can close the issue.

Skyline67 commented 6 months ago

Hi, I have the same issue, but on another line

File "fix-host-save.py", line 75 print('Modifying JSON save data...', end='', flush=True) ^ SyntaxError: invalid syntax

Could you help me ?

xNul commented 6 months ago

@Skyline67 it looks like you're using the wrong version of Python. Make sure you install Python 3.10 or above