if studyList and studyIndex then send("study " .. studyList[studyIndex]) else send("You need to add items to your study list first. See studyhelp for commands.") end