ID:261505
 
mob/proc/Cast_Ice(mob/M in oview(5))
if(usr.MP>=10)
usr.MP-=10
M.overlays+=/obj/snow
sleep(100)
Lock(M)
M.overlays-=/obj/snow
M.overlays+=/obj/ices
sleep(200)
M.overlays-=/obj/ices
Unlock(usr)


That's my code but I get a runtime error that says cannot read null.overlays

any ideas?
It seems like the problem is where the proc is called, not within the proc itself. It looks like the proc was not given an argument. Either you typed just Cast_Ice() with nothing in the (), or the var you put in the () is null. (BTW, I'm not sure what the "in oview(5)" part does for a proc.)

I would not advise using usr in a proc. It might be fine in a verb, but not a proc.