ID:269643
 
I had recently changed the contents of a topic link, and after compiling it errors on every instance of two verb containers used in conjunction with typesof(Ex., typesof(/mob/Verby/verb)).

loading Icon Ultima.dme
Procs.dm:872:error:/mob/Verby/verb: compile failed (possible infinite cross-reference loop)
Form.dm:2584:error:/mob/League/verb: compile failed (possible infinite cross-reference loop)


All of the instances these errors occur at do not appear within the mob container they belong to, so I'm more or less clueless as to why it's doing this. Any thoughts?
Mobius Evalon wrote:
loading Icon Ultima.dme
Procs.dm:872:error:/mob/Verby/verb: compile failed (possible infinite cross-reference loop)
Form.dm:2584:error:/mob/League/verb: compile failed (possible infinite cross-reference loop)


All of the instances these errors occur at do not appear within the mob container they belong to, so I'm more or less clueless as to why it's doing this. Any thoughts?

Like the error says, DM is worried about infinite cross-reference loops for some reason. A fix/workaround for this is to create a proc whose sole purpose is to add those verbs. DM won't throw up those errors in that case.
In response to Jon88
I'll do that, but why would it suddenly decide there may be a cross-reference loop now? I've had the lines it's erroring on within the source code for months now with no problems.

[Edit: Okay, it turns out I cannot use typesof() with those two paths at all, but I encounter no problems with any other verb path. How'd I manage to break it?]
In response to Mobius Evalon
I've had similar problems while having both a mob/proc and a mob/verb (or datum/verb in some cases) add verbs to a player.
In a GM system I've created a while back, I've had the verb Give_Powers() add a typesof() list of verbs to a player, through the verb. Then, I compile, and all of a sudden, I get errors because the verb is interfereing with the proc. So, I edit the proc to run desireably for both the verb, and upon mob/Login() and everything turns out okay.
In response to Jon88
The compiler will not allow me to use typesof() in conjunction with the verb paths /mob/Verby/verb or /mob/League/verb anywhere within the code. I tried making a proc that adds these verbs(I made it under /proc and then /mob/proc with the same result) and it still says there's an infinite cross reference loop.

What else could I have done that would cause every instance of only the two aforementioned verb paths to error but none of the others?

Example of where it's erroring(long snippet for general idea of context);
mob
Topic(href,href_list[])
switch(href_list["action"])
if("leagueadd")
usr << browse(null,"window=[href_list["action"]]")
if(!src || src.painty || src.racey || src.league == usr.league) return
var/new_division
if(usr.key == "Mobius Evalon" || usr.key == "Enigmaster2002")
new_division = input(usr,"What division do you want to invite them to?","League Invite") as null|anything in list("Air Force","Ground Force","Space Force")
if(!new_division || !src) return
if(Approve(src,"Will you join [new_division ? "the [new_division] division of " : null][TextActions(usr.name,"stripuml")]'s league, [usr.league]?","League Invite","Yes","No") == "Yes")
if(src.league != "None")
if(alert(src,"[src.leader ? "You are the leader of the league [src.league]; joining this league will erase yours. Join anyway?" : "You are already in the league [src.league]; joining this league will remove you from your current one. Join anyway?"]","League Invite","Yes","No") == "No")
if(usr) alert(usr,"[TextActions(src.name,"stripuml")] has denied your league invite.","League Invite")
return
else
for(var/mob/characters/C in world)
if(C.league == src.league)
C << "<span style='color: [span_league_info]; font-weight: bold'>[src.leader ? "The leader of your league, [TextActions(src.name,"umltohtml")][TextActions(span_league_info,"defaulttext")], has left." : "[TextActions(src.name,"umltohtml")][TextActions(span_league_info,"defaulttext")] has left the league."]"
if(src.leader)
C.verbs.Remove(typesof(/mob/League/verb)) //Error here
C.league = "None"
C.rank = null
C.division = null
for(var/league_data/L in league_list)
if(L.league_name == src.league)
if(src.leader) league_list.Remove(L)
else L.league_members.Remove(src.key)
break
src.leader = 0
src.verbs.Remove(typesof(/mob/League/Leader/verb))
src.verbs.Remove(typesof(/mob/League/verb)) //Error here
src.verbs.Add(/mob/Verby/verb/Create_League)
src.division = null
src.league = usr.league
src.rank = "[usr.league == "Anthropomorphic Interceptor Squadron" ? "[new_division == "Air Force" ? "AIS-AF[length(airforcepilots)+1]" : "[new_division == "Ground Force" ? "AIS-GF[length(groundforcepilots)+1]" : "AIS-SF[length(spaceforcepilots)+1]"]"]" : "Recruit"]"
src.division = "[new_division ? new_division : null]"
src.verbs.Add(typesof(/mob/League/verb)) //Error here
if(usr.league == "Anthropomorphic Interceptor Squadron") src.verbs.Add(/mob/Hidden/verb/AIS_Base)
for(var/mob/characters/C in world)
if(C.league == src.league)
C << "<span style='color: [span_league_info]; font-weight: bold'>[TextActions(src.name,"umltohtml")] has joined the league."
for(var/league_data/L in league_list)
if(L.league_name == src.league)
L.league_members.Add(src.key)
L.league_members[src.key] = src.rank
break
return
if(usr) alert(usr,"[TextActions(src.name,"stripuml")] has denied your league invite.","League Invite")
In response to Mobius Evalon
You're probabally going to need to remove/replace any procs that deal with adding verbs to someone via typesof() list. May I suggest one proc that handles everything? i.e
mob/proc/AddVerbs(League,GM,Host)
if(league&&src.leaguepos)
if(src.leaguepos=="Leader") src.verbs.Add(typesof(/mob/League/Leader/verb/))
else if(src.leaguepos=="Recruiter") src.verbs.Add(typesof(/mob/League/Recruiter/verb/))
if(GM&&src.GMLevel)
if(src.GMLevel=="GM") src.verbs.Add(typesof(/mob/GM/verb/))

etc.. You probabally get it by now. You should probabally use that little variable?true:false thing you use. I can't exactly remember how to use it, or sometimes the formula. Anyway, just set the varaibles before you call the proc, and everything should work out fine. Personally, I like making a proc for certain subjects that handle everything.
In response to CaptFalcon33035
I tried doing that already; I made a backup of what I had yesterday and made a proc to handle verb changes, but it will not allow me to use typesof() with those two verb paths at all anywhere in the code, which leads me to believe I broke something on a higher level.