Null mob error in Developer Help
|
|
Code:
NewMob(mob/M, F as file) var/mob/Player/PC/NewMob var/mob/Oldmob = M.client.mob var/MobPath = "/mob/Player/[lowertext(F["Class"])]" NewMob = new MobPath() NewMob.Read(F) NewMob.loc=locate(NewMob.last_x,NewMob.last_y,NewMob.last_z) M.client.mob = NewMob del(Oldmob)
|
So i run this after logging in and it gives the error
runtime error: Cannot modify null.mob. proc name: NewMob (/mob/proc/NewMob) source file: Procs.dm,36 usr: the thunderz (/mob/new_player) src: the thunderz (/mob/new_player) call stack: the thunderz (/mob/new_player): NewMob(the thunderz (/mob/new_player), savefiles/telnet/players/thund... (/savefile)) the thunderz (/mob/new_player): Login()
|
Problem description:
Basically I'm trying to create a new mob and set the mob to the clients mob.
|