In-Island Transaction documentation Verse Handling Payment different from Example

Summary

In-Island Transaction documentation Verse Handling Payment different from Example.
The Verse from the example is

TryBuyOffer(Player : player, Offer : offer)<suspends>:void =
        Result := BuyOffer(Player, Offer)

        if (Result?):
            # Do nothing it should respond in the purchase subscription
        else:
            Print("Failed to buy the offer")

The document
Creating Items and Offers

TryBuyOffer(Player:player, Offer : offer)<suspends>:void =
    Result := BuyOffer(Player, Offer)

    if (not Result?):
        Print("Failed to buy the {offer.name} offer.")

This fails when trying to cancel an offer
The problem is there is an extra NOT inside the IF statement.
In the working example this is correct.
This possibly due to using the code created before January 2026

Please select what you are reporting on:

Unreal Editor for Fortnite

What Type of Bug are you experiencing?

Verse

Steps to Reproduce

  1. Check the UEFN Feature Example In Island Transaction
    \Content\InIslandTransactions\buy_gnome_device.verse
    lines 31 to 36

  2. Compare this to
    Creating items - Handling Purchases

In the IF statement there is a NOT which inverts the function of IF statement and Verse transactions problems that cannot be detected until live

Expected Result

Does not deduct VBUCKS , but using code from document will deduct VBucks.

Observed Result

Will only work with “NOT” removed from Verse IF

Platform(s)

windows11

Upload an image

Additional Notes

This very hard to find and might be thought to be a Verse error but it causes a custom device verse error.
When its just a documentation error

Thank you, @Jimbohalo10 we’ll get this over to the documentation team.

I am confused, can you give more examples or explain in a different way?
From what I see both are correct…

The “not” is negatig the condition (instead of checking if result is true, it is checking if result is false). This is perfectly fine, the difference is that on one example the failure is on the else block and the other does not (thus why it being inverted the check).

It should not affect anything else and work exacty the same (both printing the purchase “failed” text when purchase fails)

1 Like