# What Am I Doing Wrong?

**URL:** <https://forums.unrealengine.com/t/what-am-i-doing-wrong/1160655>\
**Category:** Blueprint\
**Tags:** unreal-engine, question\
**Created:** [May 9, 2023, 9:42pm UTC](https://forums.unrealengine.com/t/what-am-i-doing-wrong/1160655 "2023-05-09T21:42:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kiantheskorpion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kiantheskorpion](https://forums.unrealengine.com/u/kiantheskorpion)\
**Post date:** [May 9, 2023, 9:42pm UTC](https://forums.unrealengine.com/t/what-am-i-doing-wrong/1160655/1 "2023-05-09T21:42:19Z")

</div>

Good evening everyone,

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/4/3/343061e1c83ca0f595139808f456036114003c49.jpeg)  
I don’t understand what I am doing wrong here. I’m trying to generate random consumer actions, and I have spit the random index found into a string. A red Print and a Green print before it actually sets the struct again.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/c/e/2cee5ef50830ac45e2e821ae891b4c73d4bc2677.jpeg)  
However, if you see in the second screenshot, the string is changed before that even happens, by no set deviation it appears…sometimes it does not even output a green number! What is causing a difference when I’m only grabbing a random integer once?!

---

<div class="post-metadata">

**Author:** ![L1z4rD89](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/l1z4rd89/32/1194537_2.png) [@L1z4rD89](https://forums.unrealengine.com/u/L1z4rD89)\
**Post date:** [May 9, 2023, 9:52pm UTC](https://forums.unrealengine.com/t/what-am-i-doing-wrong/1160655/2 "2023-05-09T21:52:48Z")

</div>

Hey @kiantheskorpion

could you try to save your RandomInteger as a variable (e.g. MyRandomNumber) in this blueprint and then use this variable as your string input. Because in your case you are using RandomInteger multiple times.
