ID:163080
 
mob
proc
DeathCheck() //checks to see if an attack is deadly
if (Life <= 0) //if the defender's HP is low enough...
world << "[src] dies!" //do the death messaging
src.loc=locate(8,8,27)

Thats my code but for the bottom line it says that theres a missing exppression does any1 know what that means?

Andcan someone help me fix this code?
tab in src.loc=locate(8,8,27) once.
In response to Scizzees
Tab it twice unless you want the mob to move whether it's dead or not.
In response to Kaiochao2536
ok igot the thing working but when the src respwans its Life stays at 0, anyway ican fix this?
In response to Darkarch
mob
proc
DeathCheck()
if (Life <= 0)
world << "[src] dies!" messaging
src.loc=locate(8,8,27)
Life = maxLife //or whatever your other var for the max health is...
In response to Jman9901
how would i define MaxLife? *He asks noobishly*

EDIT: Nvm i figured it out ^^
In response to Darkarch
Noobishly indeed... Hahaha, anyways, it's very easy, which you figured out. Just to make sure,

1. Define a var (maxLife)
2. Make that var the max health...

In other words... Do this:

mob/var
maxLife = 30 //Make it simple...
Life = 30 //Start out with 30 life, same as the maxLife

mob
Stat() //Always call the stat proc before you add a stat
statpanel("Health") //Make a statpanel for health (You can put the next line under a different stat panel if you want, such as statpanel("Status"), it doesn't have to be statpanel("Health")...
stat("Health = ","[Life]/[maxLife]") //Show the usr's health, in this case if you click on the tab(While running the game, of course! :D), "Health", it will say "Health = 30/30".


I hope that's what you did, if you didn't then I hope I helped you out. :D