i'm having trouble with a obj code.
obj/armor
armor
name="armor"
icon='smile.dmi'
icon_state="armor"
desc="Lightweight Armor."
obj/swords
sword
name="sword"
icon='smile.dmi'
icon_state="sword"
desc="A Sharp Sword."
but an error happens, saying that obj/armor and obj/swords are invalid, but i can put them items on the map! how do i fix this error??
ID:149626
Mar 24 2002, 9:23 am
|
|
In response to Strange Kidd
|
|
STILL says obj/armor and obj/swords are invalid.
|
In response to Penopat
|
|
Where exactly does it say that? Can you cut and paste the error here?
|
In response to Foomer
|
|
stuff.dm:130:error::invalid expression
then i click it, and it highlights obj/armor. |
In response to Penopat
|
|
The cost you posted works just fine, so it must be something nearby that is causing the error. Try posting a few lines of code above and below the two things that you posted before.
|
In response to Foomer
|
|
I have a feeling he has something like if(bleh = 1) instead of if(bleh == 1)..
-Rcet |
In response to Foomer
|
|
like what??? i'm trying things, but I just keep getting errors. can you be more specicfc??
|
In response to Penopat
|
|
He was ver specific about what he asked. He wants you to post two lines above and below you posted in your first post.
///one line above Get it? |
In response to Penopat
|
|
Try using this code with it
obj verb get() set src in oview(1) if(Move(usr)) usr << "You get [src]." else usr << "You are unable to get [src]." drop() if(Move(usr.loc)) usr << "You drop [src]." if(Move(usr.loc)) var/turf/T T = get_step(src, usr.dir) if(!T.density) sleep(1) if(Move(T)) T = get_step(src, usr.dir) if(!T.density) sleep(1) Move(T) give(mob/receiver as mob in oview(1)) |
In response to Sob
|
|
Somehow I don't think adding additional verbs would fix anything.
|
name="armor"
icon='smile.dmi'
icon_state="armor"
desc="Lightweight Armor."
obj/swords
name="sword"
icon='smile.dmi'
icon_state="sword"
desc="A Sharp Sword."
try that