You run through the functions and end up with 'if EnemyBasicMelee' then do an attack. You could just use this as the only condition and scrap the other functions.
Also one other thing to note you don't need to forward a UID anymore, you can use the 'copy picked' option in the function, if you tick this then it keeps the picked Enemies instance. Also I disagree about the 'messy' code, I would keep it all in one function when it's simple enough.
edit :
And to fix this original problem you need to send through the variable in the second function, so instead of Enemies.UID it is enemyUID the variable.
And another thing I just noticed your timer in 2nd function also won't work well as it will not pick an Enemies instance, that needs a condition like pick where UID = enemyUID unless you use the copy picked method I mentioned above.