Passing variables into the RESTORE command

Blitz3D Forums/Blitz3D Beginners Area/Passing variables into the RESTORE command

hi folks.
can anyone tell me how to pass a variable into a restore command? heres waht i wan to do. I have several map levels stored as data:

.level 1
*data here*
.level 2
*data here*
etc....
and i have a function that reads the data and builds the level:

function Build_level(level$)

restore level$ <------note this point here!!!
*read data and build level here*

end function

and when i call the level i do:
currentlevel$ = "level1"
Build_Level(currentlevel$)


now, whenever i run the program, teh point where i have noted in the function, it gets and "expects 'end function'" error. How can i force blitz to recognise that 'level$' after the Restore command should be read as a variable? I have tried str(level$) but it makes no diff. Can anyone help? Thanks....