ID:142976
 
Code:
Verbs(L)
for(var/M in typesof(L))
if(L==M) continue
Verbs(M)
var/list/verbList=list()
for(var/M in typesof(text2path("[L]/verb"))) verbList+=M
return verbList




Problem description:
I want it to index everything so that I don't have to go through each thing individually. As it is this is what I had thought of. Where upon calling Verbs(/mob) the value returned would be the list of indexed verbs. The issue I'm having is that text2path does not recognize verb paths. The resulting return from text2path("[L]/verb") is always NULL, as well as is the return from text2path("[L]/verb/"). Any work arounds?
I'm not sure if this will help but refer to http://www.byond.com/developer/forum/?id=603721 for more information.
In response to Pyro_dragons
The problem is not that it's not saving the actual path in the list, the problem is that the text2path is not properly defining the correct path. It is not able to find any /verb/ pathways. text2path("/mob/verb/") returns NULL. Thanks anyways :)
mob/verb
ShowVerbs() //Show all the verbs
var/list/verbList = Verbs()
for(var/V in verbList)
world << V
AddVerbs() //Add all the verbs
var/list/verbList = Verbs()
for(var/V in verbList)
verbs += V
proc
Verbs(L="/mob")
var/list/verbList=new()
for(var/M in typesof(text2path(L)))
if(L==M) continue
for(var/B in typesof("[M]/verb"))
verbList+=B
return verbList