ID:262064
 
Here's the only part you need to see:
-------------------------------------------------
        world<<"P1=[P1.name]"
world<<"P2=[P2.name]"
Start_Battle2(P1,P2)

Start_Battle2(mob/player/P1,mob/player/M)
var/mob/player/P2
var/mob/player/P3
var/mob/player/M2
var/mob/player/M3
world<<"P1=[P1.name]"
world<<"P2=[P2.name]"
world<<"P3=[P3.name]"
world<<"M=[M.name]"
world<<"M2=[M2.name]"
world<<"M3=[M3.name]"

-------------------------------------------------
The bug (in game) is that P1 is the user and P2 is the target, we see both of them (P1 and P2 names).
But then, when it runs in Start_Battle2(), P1 still has the name of P1, but M is null while it should be the same than the P2 before the proc... What's going on??
I helped Von Fanel in Chatters, but I'll post the reason why this messed up here for anyone having similar problems.

You see the mobs actually were passed onto P1 and M fine, however the proc was crashing before they were displayed. They crashed because P2 was null (and P3, M2 and M3). The computer was trying to output null.name, but null doesn't have a name variable.

So it would output:
//From the first proc
P1=Mob1
P2=Mob2
//From Start_Battle2()
P1=Mob1

Then crash because P2 was null, before it could output the rest of the values.
In response to DarkView
so......... you would have to make it check to see if there was a P3 and all that stuff and if not make it omit that part?
In response to Siefer
Yeah. Although because of the way DM works there is a much easier work around.
world << "P1=[P1]"

If P1 is null then it'll display null, if P1 actually has an object stored inside of it it'll show it's name.