ID:262392
 
Code:
var
global
list/Ban_List = list()
mob
Player
proc
Ban_Check()
if(src in global.Ban_List)
src << "<font color=red><font size=-1>You are banned!"
del(src)
return
else
src << "System Test Passed!"


Admin
verb
Ban(mob/Player/M as mob in world)
if(M in global.Ban_List)
src << "<i>They are already Banned!"
return
else
M << "<font color=red><font size=-1>You have been banned!"
global.Ban_List.Add(M)
src << "<font color=red><font size=-1>You have banned [M]"
del(M)


Login()
src.verbs += new/mob/Admin/verb/Ban
src.Ban_Check()
src << "<font color=green><font size=-1>Protected by: ITG_Ban"
..()

world
New()
..()
if(fexists("Save/[world.name]"))
var/savefile/F = new("Save/[world.name]")
F["Ban_List"] >> global.Ban_List
world << "Ban List loaded..."
Del()
var/savefile/F = new("Save/[world.name]")
F["Ban_List"] << global.Ban_List
..()


Problem description:
I am creating a Ban_Library for me to play around with and for some reason...it doesnt say "Your Banned" and delete you, if your banned. Maybe I am not putting them in the Ban_List correctly, or the world is not writing them correctly.

your checking to see if a mob is in a list that is not the same type I also think it would be best if you check ckey's and not the mob
In response to Zmadpeter
I already fixed that. :)
Maybe its cause font is -1??
In response to FranquiBoy
_> No..I already fixed it
You need to close all your HTML tags. Also, the color and size attributes can go in the same <font> tag; no need to use two.

As for why this isn't working, part of it is what Madpeter mentioned: You're trying to ban mobs instead of keys.

Lummox JR
In response to Lummox JR
V_V Thanks for the info on closing HTMl...BUT I did say a few times I already fixed it. Thanks anway.
It's not neccesary to use global for Ban_List. I do belive it's global by default since it was defined on the top level, meaning it's not under any objects, procs, or verbs. The keyword global is used to force local variables(ones in objects or procs) and procs to be of global scope, instead of having a local scope. Also, it's used to differentiate between variables when you have a global variable and a local variable with the same identifier.

Prodigal Squirrel