"This invocation calls a function that has the 'decides' effect, which is not allowed by its context."

The <decides> effect creates a failable context. As such, you need to use square brackets and handle success/failure.

However, the function GetRandomInt does NOT have the <decides> effect, so we can’t really help because of missing information. Share the full code if you can’t figure it out.

I highly recommend everyone here read the UEFN/Verse documentation, sorry for being blunt but this is pretty basic stuff - you need to learn to walk before you can run. The part of the docs specific to this is here - Failure - but this is a reference page, it might not make much sense as-is.