mob
var
fight = 0
hptmp = 0
choice
player
verb
Attack(mob/M as mob in oview(1))
set category = "Actions"
player = M
while(player.fight == 1)
if(player == M)
player = src
else
player = M
player.Choice = 0
why do i get these errors?
test.dm:14:error:player.fight:undefined var
test.dm:20:error:player.Choice:undefined var
ID:175859
![]() Mar 2 2003, 8:32 pm
|
|
What you have to do is tell the compiler that <code>player</code> will always be a mob; you do that by defining it as <code>mob/player</code> instead of <code>player</code>.
Note that you still refer to it as <code>player</code> when you use it; the <code>mob/</code> bit just tells the compiler that it's a mob.