ID:147822
 
mob
verb
Battletest()
world << "[src] is testing!"
movement=0
Attackadd()
Player1()
mob
proc
Player1(mob/Enemy/M in view(1))
var/choose=input("What would you like to do P1?")in choiceattack
if(choose=="Horizontal Slice")
AP=3/4
AType="ATT"
done="HSlice"
choice="swings his weapon horizontally at the [M]"
if(choose=="Vertical Slice")
AP=1
AType="ATT"
done="VSlice"
choice="swings his weapon vertically at the [M]"
if(choose=="Parry")
AP=0
AType="DEF"
done="Parry"
choice="attempts to parry a blow"
if(party==1)
Playertell()
else
src.Execute(M)
--------------------------------------------------------
With this little bit of coding, I get this error:

runtime error: Cannot read null.HP
proc name: Execute (/mob/proc/Execute)
usr: Syier (/mob/Peasant)
src: Syier (/mob/Peasant)
call stack:
Syier (/mob/Peasant): Execute(null, null)
Syier (/mob/Peasant): Player1(null)
Syier (/mob/Peasant): Battletest()

And it doesn't allow me to choose a mob when I run the verb, which is the problem I'm guessing.

Can someone help me fix whatever stupid thing I've done to screw this up?
--------------------------------------------------------
Well, one problem is that in battletest you call Player1(). The player1 proc wants you to pass it a mob of some kind.
In response to Jon88
Mmmkay, forgot about that, I fixed all my stuff now, thankee! =p
Your problem is that you are using usr in a proc.
In response to Garthor
Garthor wrote:
Your problem is that you are using usr in a proc.

Usr was nowhere in there, lol.........
In response to Syier
var/choose=input("What would you like to do P1?")in choiceattack
In response to Syier
Usr was nowhere in there

You are using usr even if you didn't mean to. The input() proc defaults to using usr as the person to recieve the input box. So you need to specify the target via the first parameter of input.
In response to Theodis
Theodis wrote:
You are using usr even if you didn't mean to. The input() proc defaults to using usr as the person to recieve the input box. So you need to specify the target via the first parameter of input.

Likewise, view() also defaults to usr as a frame of reference, and that's in there too.

Lummox JR