i had a lot of trouble with this problem but then i had a think about it and i found it would be easier to use events instead of variables.What i was trying to do was this:
take three sprites: s1 , s2 , player
(the first 2 have different variables with same names)
so if the value of player's variable (currentWeapon)
then we would get the variable of .."s" & currentWeapon .. , which would give us either s1 or s2.
since s1 and s2 have different variables with same names
i would do :: s1 or s2 (which would be determined by the earlier code) then pick the variable of the S's (e.g. s(1/2).power)