ID:263267
 
Code:
mob
var
HP = 30 //declares a new variable called HP, with a value of 30
usr.wealth += amount //add to usr.wealth


Problem description:7: Inconsistent indentation.

Please help, last part of Zilal's tutorial and it's annoying me that it wont work.

well first of all, the usr.wealth += amount shouldn't be indented under your declaration of HP. It should be wherever you want to add the amount to their wealth. Also, is wealth defined as a variable?
To use any sort of procedure or arithmetic or anything, you need to do it inside of a verb or "proc".
mob/var
wealth=0
mob/verb/AddWealth(var/amount)
if(amount) usr.wealth+=amount
In response to CaptFalcon33035
I would add "as num" there.
In response to CaptFalcon33035
CaptFalcon33035 wrote:
To use any sort of procedure or arithmetic or anything, you need to do it inside of a verb or "proc".

Correct, with the exception that in a proc, he shouldn't use usr.

Lummox JR