ID:155486
 
Would I use lists to accomplish this? Here's my problem: There's a Sergeant Major of a team and I want him/her to have a "Request Help" verb that sends a pop up to everyone from his hometown and above a certain rank. I'm pretty sure I can get the pop up part by myself, it's the sending the message part I don't understand. Could I use something that goes through two list (like the in operator, but it looks in the hometown list and then the rank list?)
mob
Sergeant_Major
verb
Request_Help()
//send the following input to everyone from his hometown above a Sergeant rank
input("Sergeant Major SoSo needs help! Do you wish to go to him/her?")in list("Yes","No")

Thanks
If you have a list of everyone in his hometown yes, then you can check their ranks, maybe better to keep an updated list of people as they login/logout & reach certain ranks so it wont lag going through everyone all the time.
In response to Superbike32
So I would have to make a list for every possible rank and then make the verb look in the Sergeant or higer lists?
In response to Jmac
If you want to track every rank you need to keep updated lists of people in each rank as they login/logout & gain higher ranks but if you only need to keep track of sergeant's & above you only need 1 list of all people that fit that, keeping track of them as the come & go & gain higher ranks.

You don't need different lists for ranks higher than sergeants as individuals lists unless you need to do something different for people also higher or equal to that rank & also don't need lists for lower ranks if you don't need the info for anything, keeping the lists to a minimum in this manner should make everything smoother(faster) & easier to maintain code by not having lots of lists that are useless to you(un-used).

It all depends on the circumstances you want things to happen in what lists you should use or even have but keeping track of players with lists is probably better than checking all players ranks at once whenever something happens that you need to do (but maybe doesn't matter much unless you had planned to have a large game as looping through everyone probably will only lag the game if called a lot or having a lot of people on).