I’m trying to save SaveGames to Steam User Cloud, but the file isn’t saved.
I tried to simply save a text file first. I’m creating a test text file to make sure that it exists.
The UserCloud->WriteUserFile(*UniqueNetId, saveName, FileContents) returns true but when I check the log I have these lines:
LogOnline:Warning: STEAM: Failed to write file to Steam cloud “test.txt”.
LogOnline:Warning: Async task ‘FOnlineAsyncTaskSteamWriteUserFile bWasSuccessful:0 UserId:MySteamUserName [0x11000023141321] FileName:test.txt’ completed in 0.018661 seconds with 0
The steam implementation works as I get my steam username and we also use other steam features which work.
Am I missing something?
OK my issue was that I was giving only the filename to WriteUserFile instead of path. So giving “/MyDir/Myfile.sav” instead of “Myfile.sav” fixed the issue.
Have you validated all the inputs? The filename, the amount of content and size all match?
I’m just running through a checklist. Are you logged in? Write permissions in the directory Valve stores the data locally?
Unfortunately Valve’s true/false doesn’t tell you much about why it failed. There is a cloud_log.txt file in the Steam\logs directory of your Steam client. It may have some clues as to why the write failed.
There are also some debug console commands in the Steam client for cloud. It’s been a while since I used it, but you can search for it on Valve’s site although I recall it being hard to find.
Question concerning return UserCloud->WriteUserFile(*UniqueNetId, saveName, FileContents);
When looking at the documentation and your code I am assuming “SaveName” is the path and the “.sav” file or just the “.sav” file? Also FileContents appears to be a uint8…where are you getting the file contents?
that log Failed to write file to Steam cloud usually means steamworks cloud not configured or quota hit - WriteUserFile can return true locally but async task fails server side
check steam partner Cloud tab is enabled, Byte quota set, and file size under quota. also make sure UniqueNetId is valid at call time (wait for login complete) and you are not writing every tick
advanced save system from fab Save System / Cloud Save / Encryption / Slot management | Fab wraps this so you dont debug raw WriteUserFile - it does Steam Cloud + EOS with auto detection, does the byte serialize and retry for you, still works local if cloud not set up