ID:155768
 
    proc
itemdrop()
if (src.shortsword >= 1)
new /obj/shortsword(loc)

//player.dm:47:error: /obj/shortsword: undefined type path

    obj
shortsword
icon = 'icons.dmi'
icon_state = "shortsword"
var
amount
New()
amount = 1



Please could someone help me with this proc. I don't know why the type path is wrong.
var/obj/X = new/obj/shortsword
X.loc = src.loc // if you want on ground where player is
X.loc = src // if you want in there inventory (contents)
In response to Warriormax

Edit: Actually I just tried it and it is still giving me an error.

    proc
itemdrop()
if (src.shortsword >= 1)
var/obj/ss = new/obj/shortsword
ss.loc = src.loc

//player.dm:48:error: /obj/shortsword: undefined type path
In response to Saladon
No need for a proc either. Couldn't do indentation at work again so you'll have to do that yourself.

obj
shortsword
icon = 'icons.dmi'
icon_state = "shortsword"
var
equipped = 0
verb
Equip()
var/obj/X = new/obj/shortsword
if(!equipped)
X.loc = src
equipped = 1
else if(equipped)
X.loc = src.loc
equipped = 0
In response to Rickoshay
Sorry to keep bugging you with questions but what does the "!equipped" argument mean?

Edit: and also there is still that Type path error for the short sword obj.

player.dm:95:error: /obj/shortsword: undefined type path

Edit again: I'm sorry, I figured out what was wrong. /obj/shortsword is not the same as /mob/obj/shortsword
In response to Saladon
You want it to be /obj/ not /mob/obj. Also if(!equipped) is basicly if(equipped == 0) but apparently more practical same with (equipped) basicly (equipped == 1). When you need higher numbers than 1 you use ==, <= or >=.

Example:
if(src.stamina <= 99) //less than or equal to.
//do stuff
else if (src.stamina == 100) // the exact same
return // no need to do anything
else if(src.stamina >= 100) // more than or equal to
src.stamina = 100
In response to Rickoshay
It doesnt work out if I just use /obj/shortsword. It keeps giving me an undefined path error. But when I use mob/obj/shortsword. it doest generae any errors
In response to Saladon
because your obj is set out like this

mob
obj
//stuff

//you want it like this
obj
//stuff
In response to Rickoshay
ohh I see. Thanks for that. I needed that wake up call lol
In response to Saladon
No problem atleast your trying mate.