ID:143551
 
Code:obj
obj
Tshirt
name = "T-Shirt"
icon = 'T-Shirt.dmi'
worn = 0
verb
Wear()
if(!src.worn)
src.worn=1
usr.overlays += 'T-Shirt.dmi'
usr << "You wear the [src.name]."
src.suffix = "Equipped"
else
src.worn = 0
usr.overlays -= 'T-Shirt.dmi'
usr << "You remove the [src.name]."
src.suffix = ""
usr.overlays -= 'T-Shirt.dmi'
Drop()
if(src:worn == 1)
usr << "Not while its being worn."
if(src:worn == 0)
src.loc=locate(usr.x,usr.y-1,usr.z)
Get()
set src in oview(1)
src.loc = usr
usr<<"You picked up some [src]"


Problem description:It says i have an error can you see the error?
It says Objs.dm:1:error: obj: expected end of statement
Also ive set the veriables on an other page they are

mob/var
worn = 0
have = 0


> obj
> T-Shirt
> name = "T-Shirt"
> icon = 'T-Shirt.dmi'
> worn = 0
> verb
> Wear()
> if(!worn)
> src.worn=1
> usr.overlays += 'T-Shirt.dmi'
> usr << "You wear the [src.name]."
> src.suffix = "Equipped"
> else
> src.worn = 0
> usr.overlays -= 'T-Shirt.dmi'
> usr << "You remove the [src.name]."
> src.suffix = ""
>
> Drop()
> if(worn)
> usr << "Not while its being worn."
> else
> src.loc=locate(usr.x,usr.y-1,usr.z)
> Get()
> set src in oview(1)
> Move(usr)
> usr<<"You picked up some [src]"
>
>
>
>

In response to Zythyr
Nop Its Not That Ive still got an error
In response to Chrislee123
Ah, couldn't tell with your first code example. Rename it T_Shirt instead of T-Shirt.
In response to Zythyr
Ive renamed it tshirt but it aint working i still get an error. and the error is with the first line>obj.
In response to Chrislee123
That is the same(line for line) as the WOTS object system

dont use it http://games.byond.com/docs/guide
The error is probably at the other end of your code, like you forgot to close a "" or something.

Which isn't to say that there isn't plenty of things wrong with the code you're showing us here, but that's a different issue.

But since I'm sure you LOVE having people rewrite your code for you:

obj
equipment
var/mob/equipped = null

armor
verb/Wear()
if(!src.equipped)
src.equipped = usr // one of the rare cases where 'usr' is okay
src.equipped.overlays += src.icon
src.equipped << "You wear \the [src,name]."
src.suffix = "Equipped"
else
src.equipped.overlays -= src.icon
src.equipped << "You remove \the [src.name]."
src.suffix = null
src.equipped = null

verb/Drop()
set src in usr.contents
if(src.equipped)
src << "You can't drop \the [src.name] while wearing it."
else
if(src.Move(locate(usr.x, usr.y-1, usr.z)))
usr << "You dropped \the [src.name]."
else
usr << "You can't drop \the [src.name] here!"

verb/Get()
set src in oview(1)
if(src.Move(usr))
usr << "You get \the [src.name]."
else
usr << "You can't get \the [src.name]!"

Tshirt
icon = 'T-Shirt.dmi'
name = "T-Shirt"
what is the code right before this? I have had this error before, and it usually has to do with the code BEFORE what it says

example:

switch(blah)
if(1)

the error would be at the next line of code.
In response to BlackWarlockLord
Erm but y cant i use that code??? is it a bug???
In response to Chrislee123