Calling Waves with Strings for Expressions

Hi,
I'm having an issue calling waves using strings and the $ command.
I've created a function which creates a series of waves with a sequence of strings and $, however when I want to call them for use an expression, I get an error message saying "$ cannot be used in this way in a function"
I've written down a basic sample code with what I'm trying to do. If anyone could shed some light on this issue, it would be appreciated.

variable j=10
string a = "Flux"+num2str(j)
Make/N=1000/D $a

variable i=10
string wavename="Flux"+num2str(i)

$wavename[0]+=10

////
error!
///
In a user defined function you must create a wave reference, like this:
variable j=10
string a = "Flux"+num2str(j)
Make/N=1000/D $a
Wave aWave = $a    // aWave is the wave reference
aWave = <something>
 
variable i=10
string name="Flux"+num2str(i)
Wave w = $name    // w is the wave reference
w[0]+=10


For details execute:
DisplayHelpTopic "Accessing Global Variables And Waves"