Why wont this work?

I am making a game and i want it so that when you hittest a guy you go to another frame where you have the things you can buy. but when i click the buy button the item dose not appear.I have this code in the buy button=on (release) {
if (_root.currentslotnum<=3) {
eval(“itemSlot”+currentslotnum).gotoAndPlay(“sword1”);
}
}
on (release) {
if (_root.currentslotnum<=2) {
currentslotnum++;
}
}
I have 3 slots in my inventory. when the buy button was in the same frame as the inventory it worked but when i moved the button to a diffrent frame it stoped working!
Dose some one know how to make it work?