steam_get_quota_total

Find the total available storage quota for game on the Steam Cloud.

Syntax:

steam_get_quota_total();


Returns: Real


Description

When using the Steam Cloud to store and synchronise files, you must set up the quota of space that your game will need. This quota is enforced on each Cloud-enabled game, on a per-user-per-game basis, so, for example, if the quota for Game X is 1 megabyte, then each Steam account that owns Game X may store, at most, 1 megabyte of data associated with that game in the Cloud. Any other Cloud-enabled games that the user owns (say, Game Y) will not be affected by the data stored by Game X. The default quota for new Steamworks games is one gigabyte, but you can change this from the Steamworks control panel for your game.

NOTE: Once the quota is exhausted file writes will fail. If you think it may be possible for the quota to be exhausted for the user of your game, you should create code to handle it, as by doing nothing you leave users in a situation where they are unable to fix things and that will lead to a poor experience of your game.


Example:

if steam_is_cloud_enabled_for_app()
   {
   quota = steam_get_quota_total();
   }

The above code checks to see if the steam cloud is enabled for the game and if so it gets the size of the storage quota and stores it in a variable.


Back: Steam API
Next: steam_get_quota_free
© Copyright YoYo Games Ltd. 2018 All Rights Reserved