In-Island Transactions – Marketplace Module Verse API Update

In today’s hotfix (v38.11), we’ve updated the Marketplace module Verse API for in-island transactions with restricting paid random items and player purchase prompts.

AllowPaidRandomItems and AllowDirectPromptsToPurchase have been directly replaced by RestrictPaidRandomItems and RestrictDirectPromptsToPurchase.

Important: The previous AllowPaidRandomItems and AllowDirectPromptsToPurchase methods will no longer exist in the Marketplace module. Projects using them will not compile, and existing islands will stop functioning until they are updated.

Below is the previous method, ‘AllowPaidRandomItems`:

OnEvent(Agent:agent):void=
if (Player := player[Agent]):
if (AllowPaidRandomItems[Player]):
Print(“Player is allowed to purchase PaidRandomItems.”)
else:
Print(“Player is not allowed to purchase PaidRandomItems.”)

This method is replaced by the ‘RestrictPaidRandomItems’ method below:

OnEvent(Agent:agent):void=
if (Player := player[Agent]):
if (RestrictPaidRandomItems[Player]):
Print(“Player is not allowed to purchase PaidRandomItems.”)
else:
Print(“Player is allowed to purchase PaidRandomItems.”)

Note that the new method contains the logic that prevents the player from purchasing paid random items if RestrictPaidRandomItems[Player] is true, whereas the previous method would prevent this if the result was false. This also applies to the change from AllowDirectPromptsToPurchase to RestrictDirectPromptsToPurchase.

Action Required
When converting these functions, make sure to invert the logic to match the new methods. This is shown in the RestrictPaidRandomItems snippet above when the else branch of the if statement now handles cases in which players can purchase a paid random item.