mob
proc
pickup()
var obj/O
for(O in view(0))
if(O.name == "pistol")
if(usr.machgunuse == 1)
usr.machgunuse = 0
usr.pistoluse = 1
usr.icon_state = "pistoluse"
usr.ROF = 10
new /obj/weapons/machgun(usr.loc)
del(O)
if(O.name == "machgun")
if(usr.pistoluse == 1)
usr.machgunuse = 1
usr.pistoluse = 0
usr.icon_state = "machgunuse"
usr.ROF = 1
new /obj/weapons/pistol(usr.loc)
del(O)
Problem description:
when you pick up the pistol, it gives this runtime error:
runtime error: Cannot read null.name
proc name: pickup (/mob/proc/pickup)
usr: Carved in Shadows (/mob/soldier/blue)
src: Carved in Shadows (/mob/soldier/blue)
call stack:
Carved in Shadows (/mob/soldier/blue): pickup()
Carved in Shadows (/client): Input("m")
Carved in Shadows (/client): m()
how can I fix it?
Yes, I stole that line.