ID:145435
 
Code:
if(totalexp >= nextlvl)
usr << "You have Gained a level!"
lvl = lvl + 1
totalexp = 0


Problem description:
This is supposed to check if your total experience equals the experience needed to level up.Then out put a message to the usr telling him he leveld up.

But when i compile i get
TESTWORLD.dm:74:error:if : invalid proc definition
TESTWORLD.dm:75:error: invalid proc definition.
Can someone help me please?
We need to see the code before it.
verb

attack(mob/bug as mob in oview(1))
if(bug.HP <=0)
usr << "[bug] is already dead!"
amount = rand(1,100)
usr << "You pick up [amount] gold."
usr.wealth += amount
exp = rand(1,10)
usr << "You got [exp] experience points."
usr.totalexp += exp
kills = kills + 1
del(bug)

else
usr << "You attack [bug]!"
oview() << "[usr] attacks [bug]!"
var/damage = rand(1,10)
world << "[damage] damage!"
bug.HP -= damage
bug.DeathCheck()


if(totalexp >= nextlvl)
usr << "You have Gained a level!"
lvl = lvl + 1
totalexp = 0

It isn't properly indented but theres the code before it.
In response to Dan13
Post your code with proper indentations using the dm tag please. From what I gather it is going to be an indentation error.
In response to Satans Spawn
It wasn't an indentaion error. But i figured it out.