Trophies - stingray.Trophies namespace reference - Stingray Lua API Reference

stingray.Trophies namespace reference

Description

The interface to access trophy functionality on PlayStation 4.

As the object is a singleton (there is only one Trophies), you do not need to pass any Trophies object to the functions. All the functions operate on the Trophies singleton.

Asynchronous operations return an id that you can pass in calls to status() to fetch progress during the operation. You must free the memory that is used for this object by calling free() when the operation is done. Otherwise, the game will eventually run out of memory.

Functions

Parameters

user_id :

integer

The ID of the player.

Returns

integer

Returns an ID for the operation, which you can pass to stingray.Trophies.status() to track the progress of the operation.

Parameters

id :

integer

The ID of the operation.

Returns
This function does not return any values.

You must call free() on all ids that you get back, whether or not the operation completed successfully. Otherwise, the trophies system will eventually run out of memory.

Parameters

user_id :

integer

The ID of the player.

Returns

integer

Returns an ID for the operation, which you can pass to stingray.Trophies.status() to track the progress of the operation.

Parameters

id :

integer

The ID of the operation to query.

Returns

integer

The status of the operation with the specified ID. May be any of the status code constants.

Parameters

user_id :

integer

The ID of the player.

trophy_id :

integer

The ID of the trophy.

Returns

integer

Returns an ID for the operation, which you can pass to stingray.Trophies.status() to track the progress of the operation.

For example:

Status codes

May be returned by calls to status().

COMPLETED : integer

The operation has successfully completed.

ERROR : integer

An error occurred during the operation.

STARTED : integer

The operation has started, but not yet finished.

UNKNOWN : integer

Either the ID was never created, or it has already been freed.