mob
var
race
owner
selected
M
icon = 'player.dmi'
Login()
..()
world << "[src] has just entered '[world.name]'!"
verb
Start_New()
switch(input("Pick your race","Race Selection") in list("Human","Undead"))
if("Human")
var/mob/human=new (loc)
human.owner = key
if("Undead")
var/mob/skeleton=new (loc)
skeleton.owner = key
When you used new before /mob/human it only made one in that location, and you did not define it. To define something use var, now var/mob/human=new(loc) makes a new human at the loc, and defines it as human. With this later in the code you can change its values and such with its defined name. Your problem wasn't type casting, it was just defining the mob in the first place
Mob.dm:16:error:human.owner:undefined var
only one error of undefined variable now