i'm trying to make this proc go through only obj/Equips/E in usr.contents instead of every obj the player mob has in his usr.contents. the code is below. you can see that this is part of a lib that is found on to display inventory on screen. i tried using var/obj/Equips/E and replacing usr.E in place of usr.contents but it doesn't work.
icon_state = "Previous"
screen_loc = "6,3"
usr.client.screen -= usr.curitem //remove the currently displayed item
usr.curitemnum-- //find the index of the item "below" the current one
if(usr.curitemnum <= 0) //if it's invalid
usr.curitemnum = usr.contents.len //set it to the "top" item
usr.curitem = usr.contents[usr.curitemnum] //set the curitem var for future clicks
usr.client.screen += usr.curitem //display the new one