ID:149254
 
Havin a lil trouble here wit my procs... I have 9 "undefined proc" errors on my game. This is what i have up and it says i need to correct, someone help please...

armor
Get()
set src in oview(1)
usr.contents += src
view() << "[usr] picks up [src]"
Drop()
new/obj/armor(usr.loc)
view() << "[usr] drops [src]"
del(src)
Equip()
if(usr.armor_equipped == 0)
usr.def += 2
usr.armor_equippped += 1
view() << "[usr] wears some armor."
else
usr << "You are already wearing something."
Unequip()
if(usr.armor_equipped == 1)
usr.def -= 2
view() << "[usr] takes off some armor."
else
usr << "You aren't wearing this."
Yoshi46 wrote:
    armor
Get()
set src in oview(1)
usr.contents += src
view() << "[usr] picks up [src]"


Hrmm, not too sure about this, but they should work if you just put a proc/ infront of each one, like so:
    armor
proc/Get()
set src in oview(1)
usr.contents += src
view() << "[usr] picks up [src]"


Of course, if you plan to have more than one type of getable object, I suggest that you leave the snippet you posted exactly how it is and just add the following (unindented) anywhere in your code.

obj/proc/Get()
obj/proc/Drop()
obj/proc/Equip()
obj/proc/Unequip()


I think that'll work, never really tried it. :) If I had at least a semi-working object system I'd test it out and make sure it works before I post, but I'm in the middle of re-writing mine, sorry.
In response to Deraxian
thanks Deraxian, you reallyhelped and now the gaem is playable even if it was just for practice. Now i ave another problem though, i tried setting the weaons all over the map and they wont show up so i can't use them. well if you have any more suggestions i'd appreciate it...
In response to Yoshi46
I cant see any icon = 'youricon.dmi'. So that may be why they are not showing up