As some of you probably know, I have spent the last bit developing a in-depth text mud in a theme of DBZ, I figured I would try to bring something new to all the DBZ fans out there (I am already putting a bit of my time into an original text mud, but main projects are first). Here is the problem... Undefined Operation? I have never once got this in my 4 years of coding, well, not to this extent..
Line 44: var/kill_give = Defender.current_powerlevel/90
that doesnt even work. It doesnt let me do any operations what so ever.. :| Yet when I set kill_give to just any number, it works fine?
runtime error: Undefined operation
proc name: Death Check (/mob/proc/Death_Check)
source file: testbattle.dm,44
usr: Kiki (/mob/player)
src: Kiki (/mob/player)
call stack:
Kiki (/mob/player): Death Check(Kiki (/mob/player), Yellow Saibaman (/mob/enemy/yellowsaiba))
Kiki (/mob/player): Battle Begin(Kiki (/mob/player), Yellow Saibaman (/mob/enemy/yellowsaiba))
Kiki (/mob/player): kill(Yellow Saibaman (/mob/enemy/yellowsaiba))
ID:147412
![]() Jun 7 2004, 5:43 pm
|
|
![]() Jun 7 2004, 5:49 pm
|
|
What is Defender.current_powerlevel? It should be a number for that to work, check to make sure it is. You could put in a debug check such as if(isnum(Defender.current_powerlevel))world.log<<"It's a number."
|
Well, if he was comparing something other than a number to a number, I believe he'd get a type-mismatch error.
|
Problem fixed. The enemie's pl var was a text string, instead of a number, and that was causing the error. Thanks.
|