ID:177027
 
turf
grass
icon = 'turf.dmi'
icon_state = "grass"

water
icon = 'turf.dmi'
icon_state = "water"
density = 1

world
turf=/turf/water

var
HP=10
Defense=5
obj
sword
icon = 'sword.dmi'
verb
Get()
set src in oview(1)
src.Move(usr)
Use(mob/M in oview())
HP()

obj
shield
icon = 'shield.dmi'
verb
Get()
set src in oview(1)
src.Move(usr)
Use(mob/M in oview())
Defense +=10

loading tutor.dme
tutor.dm:27:error:HP:undefined proc
tutor.dm:36:error:Use :duplicate definition
tutor.dm:26:error:Use :previous definition
tutor.dm:33:error:Get :duplicate definition
tutor.dm:23:error:Get :previous definition

can someone tell me whats wrong here and how to fix it?
You gave the Get and Use verbs to /obj twice. You probably meant to give them to /obj/sword and /obj/shield. Indent the lines under sword and shield like this:
<code> obj sword icon = 'sword.dmi' verb Get() set src in oview(1) src.Move(usr) Use(mob/M in oview()) HP() obj shield icon = 'shield.dmi' verb Get() set src in oview(1) src.Move(usr) Use(mob/M in oview()) M.Defense +=10 </code>
That will still have an error with <code> HP() </code>, but I'm not sure what you want that to do. It thinks you are caling a proc, but there is no HP() proc. Maybe you wanted to have it change someone's HP var, but you'd have to say M.HP instead of HP.
In response to OneFishDown
ok, thanks for the help, but now that ive changed it, i get the hp error:

obj
sword
icon = 'sword.dmi'
verb
Get()
set src in oview(1)
src.Move(usr)
Use(mob/M in oview())
M.HP()

tutor.dm:27:error:M.HP:undefined proc

pretty much same error
In response to Aidsteen
I am not sure what you want the use verb to do, but DreamMaker thinks you are trying to call a proc called <code>HP()</code>. It thinks that because you put the <code>()</code> after it. Maybe you want something like <code>M.HP -= 10</code>. If you just want to change the mob's HP var, then you don't need the double parenthesis.
In response to OneFishDown
i want it so that it takes an amount away from the person you are attacking

and also, i removed the () and made it so that
M.HP -= 10 , but then i got tutor.dm:27:error:M.HP:undefined var
In response to Aidsteen
That is because you haven't defined mob/HP.
In response to Garthor
ok, thanks for the help. got it to work