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:
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.