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

stingray.NpCommerceDialog namespace reference

Description

The NpCommerceDialog can currently only be used for the PlayStation Plus dialog.

Functions

Parameters
This function does not accept any parameters.
Returns
This function does not return any values.

There is usually no need to call this, since the dialog is normally closed by user action.

Parameters
This function does not accept any parameters.
Returns
This function does not return any values.

Must only be called when update() returns stingray.NpCommerceDialog.NONE.

Parameters

user_id :

integer

The ID of the user.

features :

integer+

You can provide one or more of the access value constants defined for the stingray.NpCheck object.

The + notation indicates that there may be one or more instances of the specified type.
Returns
This function does not return any values.

See also stingray.NpCheck.check_plus().

Can only be called when update() returns stingray.NpCommerceDialog.INITIALIZED or stingray.NpCommerceDialog.FINISHED.

Parameters
This function does not accept any parameters.
Returns

integer

A value from the result constants that indicates the result of the player's interaction with the commerce dialog.

boolean

Returns true if the features specified in the last call to open() can be used, or false otherwise.

Can only be called when update() returns stingray.NpCommerceDialog.FINISHED.

Parameters
This function does not accept any parameters.
Returns

integer

The current status of the dialog. May be any of the status constants.

Similar to update(), but does not update the status before returning it. This function is more lightweight than update(), but does not guarantee the most up-to-date information.

Parameters
This function does not accept any parameters.
Returns
This function does not return any values.

If the dialog is open it will be immediately terminated.

Parameters
This function does not accept any parameters.
Returns

integer

The current status of the dialog. May be any of the status constants.

Call this function and act upon its results once per frame while the NpCommerceDialog is in use.

Result constants

Result constants that can be returned by the result() function to indicate the result of the user's interaction with the dialog.

RESULT_OK : integer

OK.
Indicates that the user canceled the purchase.
Indicates that the user authorized the purchase.

Status codes

Status codes that can be returned by the update() function.

RUNNING : integer

The NpCommerceDialog is open.