This code looks fine. The only issue is that you're sending "data" in as an argument and as a member variable (there will be a warning about this in the console): remove the
var data = openlevs line.
You just need to call your methods. Let's say you want to save when you press F5 and load when the game starts.
openlevs = load_val()
Go to project --> project settings --> input map (tab)
Enter savelevel_ into "action field", click add. Find "save_level" at the bottom of list, click "+", then "key" and press F5.