Problem with nrf module

Hi, im using nrf module in my project for smart home, everything goes okay if i just testing nrf modules with some basic code, but if i type it in the one specific function in the code, module send data just for one time and if i want send it one more time it isnt able to send data again. Code seems very scary but if someone would be so nice to check it and think about it i would be so thankful. (its code for transmitter)

if you have questions about functions send me a message please