# What does transacts actually do?

**URL:** <https://forums.unrealengine.com/t/what-does-transacts-actually-do/1013626>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [April 15, 2023, 11:59am UTC](https://forums.unrealengine.com/t/what-does-transacts-actually-do/1013626 "2023-04-15T11:59:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![FinestCreative](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/finestcreative/32/1034971_2.png) [@FinestCreative](https://forums.unrealengine.com/u/FinestCreative)\
**Post date:** [April 15, 2023, 11:59am UTC](https://forums.unrealengine.com/t/what-does-transacts-actually-do/1013626/1 "2023-04-15T11:59:40Z")

</div>

Can anyone give an example of a verse function that `<transacts>`, or in other words undo its actions. Like how would this undoing of actions look like. I dont get it. When and how would you ever undo something after you just called the function.

---

<div class="post-metadata">

**Author:** ![FinestCreative](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/finestcreative/32/1034971_2.png) [@FinestCreative](https://forums.unrealengine.com/u/FinestCreative)\
**Post date:** [April 15, 2023, 12:07pm UTC](https://forums.unrealengine.com/t/what-does-transacts-actually-do/1013626/2 "2023-04-15T12:07:20Z")

</div>

Wait I think I get it. if I have a function

```auto
Function()<transacts>:void={
set someMemberVar = 10
}

```

and call

```auto
Function2(Xs:array)<decides>:[]int={
Looop := for:
X:Xs
Function()
1=2 #false, undo the set to 10 from Function()
}
do:
1

```

It undoes the reasignment for someMemberVar.  
Am I right or nah?

---

<div class="post-metadata">

**Author:** ![FinestCreative](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/finestcreative/32/1034971_2.png) [@FinestCreative](https://forums.unrealengine.com/u/FinestCreative)\
**Post date:** [April 15, 2023, 12:09pm UTC](https://forums.unrealengine.com/t/what-does-transacts-actually-do/1013626/3 "2023-04-15T12:09:53Z")

</div>

Also what would an undo of this function look like

```auto
Function3()<transacts>:int={
return 1
}

```

like how do you undo a return

---

<div class="post-metadata">

**Author:** ![InsanePete](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/insanepete/32/641314_2.png) [@InsanePete](https://forums.unrealengine.com/u/InsanePete)\
**Post date:** [May 1, 2023, 2:23am UTC](https://forums.unrealengine.com/t/what-does-transacts-actually-do/1013626/4 "2023-05-01T02:23:48Z")

</div>

I’d love some better documentation about the fundamentals of the Verse language and syntax.  
I’m currently fighting a ‘no\_rollback’ issue and there’s very little documentation about ‘decides’ (that I can find).

These pages are utterly useless to me at this point in my learning-curve:

> **[decides class](https://dev.epicgames.com/documentation/en-us/uefn/verse-api/versedotorg/verse/decides?application_version=1.0)**
>
> Learn technical details about the decides class.

> **[transacts class](https://dev.epicgames.com/documentation/en-us/uefn/verse-api/versedotorg/verse/transacts)**
>
> Learn technical details about the transacts class.

Also (and apologies for wandering slightly off-subject): Is there a way to limit search to only UEFN topics? Nearly every search I do returns thousands of UE answers which don’t apply.

---

<div class="post-metadata">

**Author:** ![InsanePete](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/insanepete/32/641314_2.png) [@InsanePete](https://forums.unrealengine.com/u/InsanePete)\
**Post date:** [May 1, 2023, 2:39am UTC](https://forums.unrealengine.com/t/what-does-transacts-actually-do/1013626/5 "2023-05-01T02:39:04Z")

</div>

I don’t know if this answers your question… after reading this (again!) I managed to muddle through a solution to my problem by using both `"<decides>" and "<transacts>"` specifiers on the function.

**transacts:** This effect indicates that any actions performed by the function can be rolled back. The transacts effect is required any time a mutable variable (`var`) is written. You’ll be notified when you compile your code if the `transacts` effect was added to a function that can’t be rolled back. Note that this check is not done for functions with the `native` specifier.

> **[Verse Language Quick Reference](https://dev.epicgames.com/documentation/en-us/uefn/verse-language-quick-reference)**
>
> Need to refresh on a Verse feature? This quick reference can help!

There’s a ton of stuff in this page and it’s often hard to take it in on the first (or fifth) read-through!
