Hey guys, it's me again, well i get this runtime error:
runtime error: Cannot read null.powerlevel
proc name: Attack (/mob/verb/AttackMob)
source file: mobs.dm,719
usr: Mist (/mob/characters/saiyajin)
src: Mist (/mob/characters/saiyajin)
call stack:
Mist (/mob/characters/saiyajin): Attack(null)
and i think this is the coding where the bug/error or whatever it is in:
mob
verb
AttackMob(mob/M in oview(1))
set category = "Fighting"
set name = "Attack"
if(M.npp == 0)
if(M.ko == 1)
usr << "You need to finish him for that."
if(M.ko == 0)
if(usr.ko == 1)
usr << "Not while you are knocked out."
if(usr.ko == 0)
if(usr.safe == 2)
usr << "Not while in a safe area."
if(usr.safe == 0||usr.safe==1)
if(M.safe == 2)
usr << "They are in a safe area."
if(M.safe == 0||M.safe==1)
usr.random= rand(1,7)
if(usr.random == 1)
view(6) << "[usr] throws a fury of punches at [M]!"
flick("sparfury",usr)
M.powerlevel -= (usr.powerlevel * (rand(0.2,0.9)))
M.powerlevel = round(M.powerlevel)
M.pmaxpowerlevel += 1
usr.maxpowerlevel += rand(0,1)
M.KO()
if(usr.random == 2)
view(6) << "[usr] jump-kicks [M]!"
flick("sparkick",usr)
M.powerlevel -= (usr.powerlevel * (rand(0.2,0.9)))
M.powerlevel = round(M.powerlevel)
M.kmaxpowerlevel += 1
usr.maxpowerlevel += rand(0,1)
M.KO()
if(usr.random == 3)
view(6) << "[usr] uppercuts [M]!!"
flick("sparfury",usr)
M.powerlevel -= (usr.powerlevel * (rand(0.2,0.6)))
M.powerlevel = round(M.powerlevel)
M.pmaxpowerlevel += 1
usr.maxpowerlevel += rand(0,1)
M.KO()
if(usr.random == 4)
view(6) << "[usr] sweeps [M]'s feet!"
flick("sparkick",usr)
M.powerlevel -= (usr.powerlevel * (rand(0.2,0.6)))
M.powerlevel = round(M.powerlevel)
M.kmaxpowerlevel += 1
usr.maxpowerlevel += rand(0,1)
M.KO()
if(usr.random == 5)
view(6) << "[usr] jabs [M] in the stomach!"
flick("sparpunch",usr)
M.powerlevel -= (usr.powerlevel * (rand(0.2,0.6)))
M.powerlevel = round(M.powerlevel)
M.pmaxpowerlevel += 1
usr.maxpowerlevel += rand(0,1)
M.KO()
if(usr.random == 6)
view(6) << "[usr] staggers, and misses [M]!"
flick("sparpunch",usr)
usr.maxpowerlevel += rand(0,1)
if(usr.random == 7)
view(6) << "[usr] kicks at [M], and misses [M]!"
flick("sparkick",usr)
M.kmaxpowerlevel += 1
usr.maxpowerlevel += rand(0,1)
M.KO()
if (M.powerlevel<=0)
M.ko= 1
if (M.powerlevel>0)
M.ko= 0
Can someone help me with this??
-Mist
ID:261947
![]() Feb 17 2004, 5:38 am
|
|
Press Ctrl + G and type in the line number, it will go to that line. But out of total randomness I'm going to guess that the atom who's powerlevel you are trying to find is currently nonexistant, thus, you need to find a reason WHY it's that way. :) (Deleting it, it not being initialised could be some reasons.)
-GDT |
M.powerlevel -= (usr.powerlevel * (rand(0.2,0.6)))
ok this is the line, but can it have something to do that i had 1.INF powerlevel?? |
Just looking at your error and the first three lines of code tells me that your problem is that M gets deleted before you change its powerlevel var.
|
~Ease~