ID:142190
 
Code:
    Test
name = "Big Attack"
skillpath = /mob/proc/Attack
Unk
name = "Big At"
skillpath = /mob/proc/Attack
var
skillpath
support
mob
proc
Attack(mob/M)

if(M)
src<<"<i><font color = orange>You attempt to attack [M]."
M<<"<i><font color = purple>[src] attempts to attack."
sleep(10)
if(rand(1,3)==1)
var/dmg = src.str - M.def
if(dmg)
src<<"<i><font color = red<<font size = 1>You attacked [M] for [dmg] damage!"
M<<"<i><font color = blue><font size = 1>[M] attacked you for [dmg] damage!"
M.hp -= dmg


Problem description:
When I use the call proc for this it says runtime error: Cannot read /battleskill/Unk (/battleskill/Unk).skillpath
Please, show the code that lets us know how you used the call proc.
In response to Jemai1
                     var/battleskill/B = pick(A.skills)
var/path = B.skillpath
call(A,path)(M)

Sorry their fragmented
var/mob/M = pick(A.enemies)

In response to Choka
call(A,path:name)(M) // the second argument must the name of the verb/proc; not the path
In response to Jemai1
..The /battleskill has a skillpath which is the proc. I've made it so it doesnt do mile long if chains by making the /battleskill. I cant call the proc name because it would cause an if chain that will take forever to complete.
In response to Choka
call proc
Format:
call(ProcRef)(Arguments)
<font color="red">call(Object,ProcName)(Arguments)</font>
call(LibName,FuncName)(Arguments)

Look at my previous post. If you didn't notice, I replaced 'path' with 'path:name'.
In response to Jemai1
path is the <font color = red>ProcName</font> and path:name doesn't helpe either.
In response to Choka
path is the <font color="red">ProcRef</font> (/mob/proc/Attack) and path:name is the name of /mob/proc/Attack which is "Attack".

EDIT: I tried using ProcRef and ProcName. Both of them works. The problem is caused by some other reason.

EDIT2: Now I know.
var/battleskill/B = pick(A.skills)

You defined B as /battleskill but actually it's not. A.skills is a list of typepaths. Therefore, B is a typepath and it doesn't have a skillpath var.

Fix:
var/path = pick(A.skills)
var/battleskill/B = new path
call(A,B.skillpath)(M)
In response to Jemai1
          Unk
name = "Big At"
skillpath = /mob/proc/Attack
var
skillpath
support
In response to Choka
         Battle(mob/M)
var/command = "Attack"
command = input("Which command?","Commands")in list("Skill","Attack")
if(command == "Attack")
var/mob/N = input("Which enemy do you wish to fight?","Enemy")in M.enemies
M.Attack(N)
if(command == "Skill")
var/mob/A = input("Which enemy do you wish to fight?","Enemy")in M.enemies
var/list/L = M.skills
if(L.len)
var/battle/battleskill/I= input(M, "Pick a skill to use","Skill") in L + "Back"
if(I=="Back")
Battle(M)
else
var/path = I.skillpath
//call(M,path:name)(A)
call(M,path:name)(A)

Its something about that procedure causing the runtime error
Cannot Read(/battle/battleskill/).skillpath. Because it works perfectly when I call it indivually.