ID:2122669
 
Code:
mob
icon = 'person.dmi' //make it so all mobs will be created with the person icon
var
HP = 30 //define a new variable called HP, with a value of 30
wealth
bug
icon='bug.dmi'
Del()
var/obj/gold/G=new(loc)
G.amount=rand(1,100)
..()
Login()
icon_state = gender //when a player logs in, get them the right icon state for
..() //the gender of their key. Then call the parent!

proc
DeathCheck() //check to see if an attack is deadly
if (HP <= 0) //if the defender's HP is low enough...
world << "[src] dies!" //give the death messaging

verb
attack(mob/M as mob in oview(1)) //attack a mob within 1 tile of you
usr << "You attack [M]!" //send this message to the usr
oview() << "[usr] attacks [M]!" //send this message to everybody else
var/damage = rand(1,10) //assign a random # to a new variable
world << "[damage] damage!" //tell the damage to the world
M.HP -= damage //take away the damage from M
M.DeathCheck() //check for death with a proc

say(msg as text) //what the usr says is passed into "msg" as text
world << "[usr]: [msg]" //the world sees chatroom-like output
turf
grass //define a "grass" prototype, which is a kind of turf...
icon = 'grass.dmi' //that has an icon named 'grass.dmi'. In single quotes!

world //set one of our world's characteristics:
turf = /turf/grass //its default turf is the grass turf.


Problem description:
Why am i getting 20 indentation errors right when i add this code?
bug
icon='bug.dmi'
Del()
var/obj/gold/G=new(loc)
G.amount=rand(1,100)
..()
In the first code block I don't see the problem straight away.


Your lines in the second code block after bug have one too many tabs. Highlight them and press SHIFT+TAB to fix the indentation.

It should look like this:
bug
icon='bug.dmi'
Del()
var/obj/gold/G=new(loc)
G.amount=rand(1,100)
..()


Not like this:
bug
icon='bug.dmi'
Del()
var/obj/gold/G=new(loc)
G.amount=rand(1,100)
..()