In response to Avren
Well, Could you explain this for me?


When i add this:
        Checkexp()
if(src.exp == src.maxexp)
src.lvl +=1
src.maxexp += 20
src.exp = 0
src.str += 1
src.minstr += 1
src.maxhp += 25
else



To the end of this:

mob
proc
HurtMe(damage,mob/attacker)
src.hp = max(src.maxhp)
src.Deathcheck(attacker)
Deathcheck(mob/M)
if (src.hp <= 0)
src.Die(M)
Die(mob/killer)
viewers(src) << "[src] has been killed[killer ? " by [killer]":""]!"
if(killer) {killer<<"You killed [src]!";killer.exp += 5}
src.icon_state="dead"
sleep(40)


I get mass errors on stuff not even related to the code!

Then i revised to this:
mob
proc
HurtMe(damage,mob/attacker)
src.hp = max(src.maxhp)
src.Deathcheck(attacker)
Deathcheck(mob/M)
if (src.hp <= 0)
src.Die(M)
Die(mob/killer)
viewers(src) << "[src] has been killed[killer ? " by [killer]":""]!"
if(killer) {killer<<"You killed [src]!";killer.exp += 5}
src.icon_state="dead"
sleep(40)
Checkexp()
if (src.exp = src.maxexp)
src.lvl +=1
src.maxexp += 20
src.exp = 0
src.str += 1
src.minstr += 1
src.maxhp += 25
else


And these are the errors =/

Attack system.dm:61: Inconsistent indentation.
Attack system.dm:73: Inconsistent indentation.
Attack system.dm:74: Inconsistent indentation.


The problem codes are these

            src.set_loc(locate(73,28,3)) //call custom proc defined below // line 73
//---------------------------------------------------------
src << "You have died, You are transported to the hospital" // line 74
//---------------------------------------------------------
Checkexp() //line 61





In response to Animay3
Em, you have an empty else statement.
In response to Animay3
You don't understand the code in your game- I don't think` you wrote it in the first place.

Read this, it should help you out.
In response to Elation
Elation wrote:
You don't understand the code in your game- I don't think` you wrote it in the first place.

Read this, it should help you out.


Erm, This is from scratch. Sorry if you think i ripped. I did use other people's code examples though.

Oh, And i fixed it on my own.
Page: 1 2