ID:139838
 
Code:
mob
verb
Attack(mob/M as mob in oview(1))
var/damage = usr.str - M.def
if(damage <= 1)
damage = 1
if(damage >= 1) src.Str_Mastery += 100
else
M.hp -= damage
view() << "[usr] attacks [M] for [damage] HP!"
M:deathcheck()

mob
proc
deathcheck()
if(src.hp <= 0)
view() << "\red [src] dies!"
src.hp = 10
src.Move(locate(1,1,1))
usr.str += 1
usr.def += 1


Problem description:
loading Map1.dmm
saving Game2.dmb

Game2.dmb - 0 errors, 1 warning (double-click on an error to jump to it)


In response to Darker Legends
I have a Warning and I cant find out where it's coming from :(
In response to M6qllp9M
Double click on it and you should see the line where the warning is coming from?
In response to Raimo
I know. It usually does that but it looks like this...

loading Map1.dmm
saving Game2.dmb

Game2.dmb - 0 errors, 1 warning (double-click on an error to jump to it)
In response to M6qllp9M
Do you have any other codes in ur envoriment?
In response to Raimo
Yeah it might be this...

mob/var
money = 100
str = 5
def = 5
hp = 100
maxhp = 100
Str_Mastery = 0
Str_Mastery1 = 100
mob/Stat()
statpanel("[src]'s Statistics")
stat("str:",str)
stat("def:",def)
stat("hp:","[src.hp]/[src.maxhp]")
stat("money",money)
statpanel("Inventory",contents)
if (statpanel("Skill List"))
stat("Str Mastery","[src.Str_Mastery]/[src.Str_Mastery1]")



mob/proc/level_upstr()
if(src.client)
if(src.Str_Mastery >= src.Str_Mastery1) //Once Str_Mastery is equal to Str_Mastery1 it will level up your strength by 1.
src.str_up()
src <<"\red You feel as though your knowledge in strength has increased"
src.Str_Mastery1 *= 1.5 //It takes 1.5x more exp to level up next time.
src.Str_Mastery = 0 //The exp is reset back to 0.

mob/proc/str_up()
src.str += 1
You should not be using the : operator, ever. Use . instead. Always. If it doesn't work, then FIX IT.

You should not be using usr in procs. Ever. This is what your deathcheck() should look like:

deathcheck(var/mob/attacker)
if(src.hp <= 0)
view(src) << "[src] dies"
src.hp = 10
src.Move(blah)
attacker.str += 1
attacker.def += 1


You would call it from Attack like so:

M.deathcheck(src)


And, by the way, inspect the logic in your Attack() verb a bit closer. It's always going to do exactly the same thing.

As for your warning: scroll up in the error window.