ID:142282
 
Code:
        DblClick(loca,ctrl,para)
if(findtext(para,"right=1"))
text_command += "r"
if(findtext(para,"left=1"))
text_command += "l"
if(text_command == "l")
usr << browse(info,"window=info")
if(text_command == "r")
usr.learned_skills.Add(src)
usr.lrn_skll.Remove(src)
usr.learned_a_skill ++
usr.skill_points --
usr << "You have learned [name]."
if(shyunpo)
usr.shyunpo_learn = 1
text_command = "


Problem description:
I have this code into the DblClick proc for a group of objects. I have it setup where I will double click the obj in a custom panel, but I just get this error:
runtime error: undefined proc or verb /obj/skillcards/shyunpo/Add().

proc name: DblClick (/obj/skillcards/DblClick)
usr: SDfsdf (/mob/characters)
src: Shyunpo (/obj/skillcards/shyunpo)
call stack:
Shyunpo (/obj/skillcards/shyunpo): DblClick("Learn", "infowindow.info", "right=1")

I know it's being caused by the lists learned_skills and lrn_skll, but I don't know why.

Also: It worked when I had the lists setup in var form. Like this..

atom/var/lrn_skll[50]
atom/var/learned_skills[50]

However, when they were shown in the tab, the new objects would be all the way at the bottom and you would need to scroll down to seem them. Now I have them like this..

mob/var/list/lrn_skll = list()
mob/var/list/learned_skills = list()
Please post the code that involves /obj/skillcards/shyunpo/Add().
In response to Jemai1
That is the only code that involves the Add() proc.
In response to Gypsy
Are you sure you didn't set learned_skills = new/obj/skillcards/shyunpo (or something like that) anywhere in the code?
In response to Jemai1
Whenever someone logs in I have this:

            if(isnull(usr.lrn_skll))
usr.lrn_skll = newlist()
if(isnull(usr.learned_skills))
usr.learned_skills = newlist()
In response to Gypsy
As you can see, coding something like this:
mob
var/list/my_list = new/obj

verb
Create_Error()
my_list.Add()


would produce a similar runtime error.

runtime error: undefined proc or verb /obj/Add().

proc name: Create Error (/mob/verb/Create_Error)
usr: Guest (/mob)
src: Guest (/mob)
call stack:
Guest (/mob): Create Error()

How is this possible?
-> my_list is defined as a list but it's value is another datum which doesn't have an Add() proc.
In response to Jemai1
Oh! Thank you! What would I have to set the list as, then? I tried atom/var/list, but it causes my NPCs to have them too and make my client run out of resources before I can even load a save file.

Edit: I took out the /list part and tried this:

atom/var/learned_skills[]
atom/var/lrn_skll[]

But it's giving me the same error.
In response to Gypsy
If you want to set a list's value at compile time, it should look like this:

mob
var/list/learned_skills = list(new/obj/skillcards/shyunpo)