ID:272106
 
why does this not work

        for(var/obj/Jutsu/Buttons/Fire_Ball/ in usr)
usr.Frozen=0
alert("You already know this Jutsu")
return
You have to point out who gets the alert.

alert(usr,"You already know this Jutsu")
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
icon='base.dmi'
mouse_over_pointer = 'Shop.dmi'
Click()
usr.Frozen=1
switch(input("Do you wish to learn a new Jutus?")in list("Yea!","No"))
if("Yea!")
switch(input("They wont be cheap, 100 a piece.")in list("Sure","No"))
if("Sure")
if(usr.Money<=99)
alert("Yea right")
usr.Frozen=0
return
else
switch(input("Have your pick")in list("Fire Ball","Water Blast","Ninja Info","Nevermind"))
if("Fire Ball")
if(locate(/obj/Jutsu/Buttons/Fire_Ball) in usr)
usr.Frozen=0
alert(usr,"You already know this Jutsu")
return
usr.Money-=100
new/obj/Jutsu/Buttons/Fire_Style/Fire_Ball(usr)
alert("Here make these hand seals...")
usr.Jutsu_Count+=1
usr.Frozen=0
return

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.