ID:1667131
 
(See the best response by GhostAnime.)
Code:
runtime error: wrong type of value for list
proc name: Login (/mob/Login)
usr: KiKoro (/mob)
src: KiKoro (/mob)
call stack:
KiKoro (/mob): Login()

Then when i login i get this
runtime error: wrong type of value for list
proc name: Login (/mob/Login)
usr: 123 (/mob)
src: 123 (/mob)
call stack:
123 (/mob): Login()
123 (/mob): Start()
Start Screen (/obj/startscreen): Click(Water (106,149,1) (/turf/Water/Water), "default.map", "icon-x=167;icon-y=508;left=1;s...")

My login
mob/Login()
if(!(key in UnBanables))
if(client)
if(Bans)
if(BansFind(client.address) || BansFind(key))
src << "\red You have been banned."
src << "\red (If you feel this was unjust please go to the forums and post under complaints)"
del(src)

if(is_banned(key))
if(ban_expired(get_ban(key)))
message_admins("BAN EXPIRED: [key]")
remove_ban(key)
else
var/ban/BAN = get_ban(key)
src << "<font color=red>You have been banned.</font>"
src << "<font color=red>[BAN.reason]</font>"
src << "<font color=red>Banned till [time2text(BAN.time*600)]. ([round((BAN.time-(world.realtime/600)))] minutes).</font>"
del(src)

Problem description:

Best response
Honestly, you should do a ban check at world/IsBanned() since that is consulted before the client logs in (so, if they are banned, then your server will not be affected by the banned user logging in like lag from downloading the resources).

Here is a snippet did to keep Guests out; I am sure you can figure out how to get the effect you want (just be sure to read it's DM entry).

As another note, if you do get an error, enable debug mode (via #define DEBUG). This will output more information such as what line in which file the error occurred (just be sure to remove it when releasing your game).

I am assuming this may be the error
var/ban/BAN = get_ban(key)

If get_ban() returns a /list, you should define that variable as a var/list rather than var/ban.

But that's my assumption of where the error MIGHT be. You should enable DEBUG to verify the line it occurs at.
Well alright still kinda new to coding.
I don't see anything in the given code that would cause that error. For me, that error comes when I try to add a non-object to client.screen... or was it when I loaded a variable that no longer exists in the code...?

Some built-in lists, such as client.screen, atom.overlays, client. and mob.verbs, only accept certain types. That error comes when you try to add the wrong type to a list, but I don't see any list addition in this code.