There were a bunch of errors in your code. Mainly, you were mixing code for tops and shoes together. The corrected code should look like this:
<<for _a, _shoes range $player_Shoes>>
<<capture _a>>
<<link _shoes "Closet">>
<<set $player_Shoes.push($clothes.shoes[0])>>
<<set $clothes.shoes[0] = $player_Shoes.deleteAt(_a)[0]>>
<</link>><br>
<</capture>>
<</for>>
Here were the errors:
- You had "$player.Shoes" instead of "$player_Shoes" inside the <<for>> macro.
- You needed to use the <<capture>> macro as greyelf pointed out.
- Technically, you shouldn't have "_shoes" in quotes in quotes inside the <<link>> macro.
- You had "$player_Tops" instead of "$player_Shoes" inside the <<set>> macros.
- You had "$clothes.top[0]" instead of "$clothes.shoes[0]" inside the <<set>> macros.
- Because the .deleteAt() method returns an array, you need a "[0]" at the end to get the value of the first element in that array (as explained earlier).
- Also, you misspelled "Heels" as "Hells". :-P
Now that that's all sorted out it should work.
Also, if you want to make it so that the passage doesn't have to refresh every time you click an item, you could create another passage, let's call it "Display Closet", and use an <<include>> macro inside of a <span> or <div> element with a unique ID to include the "Closet" passage in that new passage. Then, in the "Closet" passage, remove the "Closet" part from your <<link>> and add a <<replace>> macro after the <<set>> macros which replaces the contents of the <span> or <div> with that same <<include "Closet">> line from earlier. That will cause the text there to be updated with the new information every time the user clicks an item.
In other words your "Display Closet" passage would look like this:
<div id="contents"><<include "Closet">></div>
And the code in the "Closet" passage would have to be changed like this:
<<for _a, _shoes range $player_Shoes>>
<<capture _a>>
<<link _shoes>>
<<set _tmp = $clothes.shoes[0]>>
<<set $clothes.shoes[0] = $player_Shoes[_a]>>
<<set $player_Shoes[_a] = _tmp>>
<<replace "#contents">>
<<include "Closet">>
<</replace>>
<</link>><br>
<</capture>>
<</for>>
(I also changed the code to swap items, because it will look better when displayed this way.)
That would make it basically reload the "Closet" passage within the "Display Closet" passage, without causing the "refresh blink" you're seeing currently. Then you'd just need to change any links to "Closet" elsewhere in your code to open the "Display Closet" passage instead.
If that's a little confusing, see this "Simple Update Without Reload" sample code which explains how it all works. (Click the "Jump to Start" link in the UI bar to see other sample code.)
The one downside to this method is that if you change your clothes and then save your game without going to another passage first, then when you reload your clothes will be back to what they were when the passage originally loaded, instead of what they were when you saved. If you go to another passage before saving then everything will be saved just fine. There is a workaround for that problem, if you're interested.
Have fun! :-)
EDIT: If you saw a version of this within the first 45 minutes of posting, I caught another error I missed earlier and added a few more notes.