ID:262714
 
mob/other/choosing_character
Login()
if(banned.Find(usr.key) || banned.Find(usr.client.address))
del(usr.client)
return
else
spawn()
src.ChooseCharacter()

<b>Problem description:</b>
runtime error: Cannot execute null.Find().
proc name: Login (/mob/other/choosing_character/Login)
usr: Rky_nick (/mob/other/choosing_character)
src: Rky_nick (/mob/other/choosing_character)
call stack:
Rky_nick (/mob/other/choosing_character): Login()
: New()
: New()
: New()

what does this mean?
mob/other/choosing_character
Login()
if((key in banned)||(client.address in banned))
del(src)
spawn ChooseCharacter()

You should use the in statement instead, as it should work even if the variable is null. Which that is your problem. Also, you do not need the return or else statement either, since if you are deleting them, the proc is going to end itself. Also, it may be better to have the banned check in client/New() instead, so that is something to think about it. Although it would not really make much of a difference.

You also might want to make sure that banned is not null anymore. Since if you plan to ban someone while in the game to add them to the banned list, it would be hard to do so if the list is null.

If you are reading banned from a savefile, and the list is empty the savefile, that may be why it is null. So you should have a check for it to make sure that it is not, and if it is, to set to a list intead.
In response to Kija
ty