ID:945448
 
(See the best response by NNAAAAHH.)
Code:
mob
var
Sthere = 0


mob/medical
verb
bodyesteal()
set name = "Eye Steal(Corpse)"
set desc = "Create a clone that can attack"
set category = "Ninjutsu"
for(var/obj/corpse/C in oview(1))
if(usr.firing)
return
if(usr.Frozen)
usr<<"Your frozen"
return
if(usr.caught)
usr<<"Your captured"
return
if(usr.chakra <= 15000)
usr << "Not enough chakra!"
return
if(usr.inso)
return
if(usr.meditating)
usr<<"Not while meditating"
return
if(usr.Kaiten||usr.counter)
return
if(C.Sthere)
usr.sharinganeyes += 1
C.Sthere -= 1
else
usr<<output("This corpse doesn't have any eyes.","chat")


Problem description:
It keeps telling me: C.Sthere undefined var but its clearly defined

Sthere is a mob var and Corpse is a object.

So remove the mob.
remove mob and put what?
    var
Sthere = 0
or if the mob never uses Sthere
obj
var
Sthere = 0
Best response
mob
var
Sthere = 0


            for(var/obj/corpse/C in oview(1))
if(C.Sthere)
usr.sharinganeyes += 1
C.Sthere -= 1


Objs don't have the same variables as mobs until you give them those variables. If both mob and obj are supposed to have the same named variable, then define it for both.
In response to NNAAAAHH
NNAAAAHH wrote:
If both mob and obj are supposed to have the same named variable, then define it for both.

I usually define things for /atom/movable in that situation, actually.
In response to Kaiochao
As do I, I just thought it easier to explain it as defining for both rather than having to explain /atom and /atom/movable.