ID:2936725
 
(See the best response by Lummox JR.)
Code:
    proc/attackplayer()
for(var/mob/M in oview(1))
if(M.name in src.killlist)
if(get_step_away(src,M,3))
usr.CloneAttack(src)
src.Death(usr)
else
return
..()


Problem description:
I just updated my BYOND version by like 2 versions, and now a bunch of my ..()'s are broken. "warning (no_parent): ..: ..() has no parent proc to call" How do I fix this or atleast turn off the warnings? Cuz I'm not sure how. I do not want advice on improving the code, I only want to know how to fix this specific issue.
Best response
The warning exists because calling ..() there does absolutely nothing. You should remove that line. If that's happening all over your code, fix it.

Also, that proc has usr abuse in three places (one of them the oview() call). usr has no place in a proc.

Remove the parent call. You both exit the function before the parent call would be able to run and there's no parent function to call.
In response to General Do-Nothing
Its an AI loop for NPC combat
In response to Lummox JR
Well uhh it used to do things, now its giving a warning that it doesn't, lol. Its not just this game, its doing it in all my games.
In response to Narutogx2
Why would that matter in this instance?
In response to General Do-Nothing
I presume that its continuing the process with the ..() so its continuing the AI? I was never fully sure what it did, I just left it where it already existed.
In response to General Do-Nothing
Another example would be this
    proc/attackplayer()
for(var/mob/M in oview(1))
if(get_step_away(src,M,3))
if(M.client)
continue
src.Attack(M)
else
return..()
spawn(15) src.attackplayer()
In response to Narutogx2
Nah, because this is the place where the function is originally defined a super call (..()) wouldn't do anything. It only triggers on redefined or subtyped functions. In this case the function was exited before super could have been called as well. Your issues are probably related to other byond updates. What version were you previously on?
In response to General Do-Nothing
I think 515? Or around that?
So ..() basically calls the parent proc. So imagine you over write an inbuilt proc like Login(), ..() would do what the default proc does.

mob
Login()
//do stuff

..()


Now I'm no expert in DM, but I'm assuming your proc/attackplayer() is the first instance of the proc so there's no parent proc to call to.

mob
proc
attack()
//do stuff
//this is the parent.

player
attack()
//do stuff
..() //call the parent.

npc
attack()
//do stuff
..() //call the parent.
In response to Rickoshay
Well, the full thing is this, I just posted a snippet cuz I didn't think the whole thing was relevant.

mob/MadaraLimbo
density=1
proc/move()
var/tickcounter = 0
while(src)
sleep(5)
if(!src.kotolocked|!src.Frozen)
for(var/mob/M in oview(8))
if(M.client||istype(M,/mob/puppets)||istype(M,/mob/Clones)&&M.owner!=src)
if(M.name in src.killlist)
if(src.target=="")
src.target = M
if(!(M.name in src.killlist))
src.killlist += M.name
break

if(src.target!=""&&!src.Frozen)
if(get_step_away(src,src.target,8))
step_to(src,src.target)
tickcounter = 0
else
src.target = ""
if(src.target=="")
if(src.loc!=src.startingloc)
tickcounter+=1
if(tickcounter>=20)
if(get_step_to(src,src.startingloc)==null)
step_towards(src,src.startingloc)
else
step_to(src,src.startingloc)
if(src.loc==src.startingloc)
src.dir = SOUTH
proc/attackplayer()
for(var/mob/M in oview(1))
if(M.name in src.killlist)
if(get_step_away(src,M,3))
usr.CloneAttack(src)
src.Death(usr)
else
return
..()
spawn(10) src.attackplayer()
New()
src.attackplayer()
spawn(5)
src.move()


There's tons of areas in the code that use the attackplayer proc, its not the only one
So what happened when you removed ..()?

This is also very broken.
    proc/attackplayer()
for(var/mob/M in oview(1))
if(M.name in src.killlist)
if(get_step_away(src,M,3))
usr.CloneAttack(src)
src.Death(usr)
else
return
..()
spawn(10) src.attackplayer()

//here's a fixed version.
proc/attackplayer()
for(var/mob/M in oview(1))
if(M.name in src.killlist)
if(get_step_away(src,M,3))
src.CloneAttack(M)// src == the mob calling the proc, M the mob being attacked.
M.Death(src)//M is the one who is dying, src is the one who killed.
else
return
spawn(10) src.attackplayer()
In response to Rickoshay
I haven't tested it yet because I was worried about it breaking things without it, lol. Also, oddly enough, the code works as is, it doesn't actually need fixing. Also, this is slightly separate, but this also doesn't work if I just remove it, lol.
world
proc
Lag_Guard()
spawn while(1)
if(lagset == 0)
if(world.cpu >= def)
world.tick_lag -= 1
world.tick_lag = round(world.tick_lag)
if(world.cpu < def)
if(world.tick_lag == tick_mem)
..()
else
world.tick_lag -= 1
world.tick_lag = round(world.tick_lag)
else
if(world.cpu >= clag)
world.tick_lag += 1
world.tick_lag = round(world.tick_lag)
if(world.cpu < clag)
if(world.tick_lag == tick_mem)
..()
else
world.tick_lag -= 1
world.tick_lag = round(world.tick_lag)
sleep(80) //Checks every 3 seconds
..() should never be called in a proc declaration. Only in proc overrides.