for(var/obj/Jutsu/Buttons/Fire_Ball/ in usr)
usr.Frozen=0
alert("You already know this Jutsu")
return
ID:272106
Mar 29 2008, 2:46 pm
|
|
why does this not work
|
Use locate() as you are searching for one object!
if(locate(/path) in X) Also, know how vars work, you are looking for /obj/Jutsu/Buttons, with the variable shortcut as "Fire_Ball" Also, are you sure that it is in the usr's content or is it on the screen (cuz of the button path)? |
In response to GhostAnime
|
|
nope its in the users contents and it still has an error, did i put it in right?
if(locate(/obj/Jutsu/Buttons/Fire_Ball) in usr) |
In response to Lt. Pain
|
|
Yes that's right.
|
In response to Lt. Pain
|
|
That's correct (assuming if it is in a verb. If it's in a proc, usr is most likely not what you want to use). That will see if that object is already present.
If you are getting an error, it would be wise to tell us what error is it and more information instead of just saying it doesn't work... |
In response to GhostAnime
|
|
Aight here is the whole code:
Jutsu_Salesman obj.dm:839:error:/obj/Jutsu/Buttons/Fire_Ball:undefined type path |
In response to Lt. Pain
|
|
... You do know what it means by "undefined type path" right?
It means that path (/obj/Jutsu/Buttons/Fire_Ball) was not programmed in (remember, spelling and capitalizing matters) I see you use two paths: /obj/Jutsu/Buttons/Fire_Ball <-- Error /obj/Jutsu/Buttons/Fire_Style/Fire_Ball <-- the path added Surely you can see what part of the path you missed. |
In response to GhostAnime
|
|
___> wow blonde moment, thank you |
In response to Lt. Pain
|
|
Eh, it happens. And you're welcome.
|
alert(usr,"You already know this Jutsu")