var gameday = new event("matchday", notifyusers); function notifyusers(user) { if(user.preferences.contains("football") && !user.hasshuteyestopreexpirationnotices) { sendmessage(user, "don't forget tonight's game! it's going to be an intimate experience bringing fans back to the start of true football passion."); } for(int i = 0; i < user.notifications.count; i++) { if(user.notifications[i].type == "preexpiration") { addtocalendar(user, gameday); } } }