ID:141590
 
Code:
mob/shurikenmove
verb
Demon_Wind(mob/M in view)
set category="Jutsus"
set name = "Demon Wind Shuriken"
if(usr.firing)
return
if(usr.chakra<=10000)
usr<<"Not enough chakra."
return
for(var/obj/Wshuriken/S in view)
if(S.Gowner==usr)
S.icon = usr.icon
S.overlays += usr.overlays
view(usr)<<"<font size=1><font face=verdana><b><font color=white>[usr]<font color=green> Says: Demon Wind Shuriken: Windmill of Shadows!"
var/obj/kunai/K = new()
K.Gowner = usr
K.tai = usr.tai
K.loc = S.loc
sleep(3)
walk(K,M)
sleep(50)
del(K)
del(S)
usr.chakra-=10000
usr.Chakragain()


Problem description:
Nothing happens when I use it on a Wshuriken in sight that labels me as the owner.
Try to use; oview(you're screen size, usr)
I'd like to try and help you, but you've made that very difficult. When posting a problem, you need to provide as much relevant information as possible, and you need to provide that information as clearly as possible. I have no clue what "Nothing happens when I use it on a Wshuriken in sight that labels me as the owner" means. The problem seems to be that nothing is happening, but the way you've written this reads something like "nothing happens that labels me". Should something happen to make you labeled? I'm not being mean here, I really have no idea what you're saying.

Just looking over the code, though, I can suggest some things which may help. First, whenever "nothing happens" you need to find out how much nothing is happening. This means throwing some diagnostic messages out while the proc (verbs are a type of proc) is running. That information could look like this:
mob/verb/example()
world << "The example verb has started."
do_stuff()
world << "Example: checkpoint 1 reached."
if(stuff == other_stuff)
world << "Example: checkpoint 2 reached."
do_more_stuff()
world << "Example: checkpoint 3 reached."

world << "Example: checkpoint 4 reached."
if(more_stuff == other_stuff)
world << "Example: checkpoint 5 reached."
do_other_stuff()
world << "Example: checkpoint 6 reached."

world << "Example verb ending."


When you run that verb you should at least see the text "The example verb has started" appear in your output area. You should then see some of the other checkpoints. If you get checkpoints 1 through 5, but don't get 6 or the ending message, then you know that something happened in the "do_other_stuff()" proc which is causing your verb to end. Then you can tell people "The verb runs all the way up to checkpoint 5, but stops when it gets to the line with do_other_stuff(). I don't know what's causing the problem."

That's a problem that we can help with. As it is now, the problem could be anywhere in that code you posted. Diagnostic messages are a programmer's best friend.

There are two things about the code that you posted that I would like to comment on, though:

First, you're using the word "view" as if it's a variable: Line 3 which reads "Demon_Wind(mob/M in view)", and line 11 which reads "for(var/obj/Wshuriken/S in view)". view() is a proc which you have to call. You should read about it in the DM reference (theres a searchable, easy to use version of the reference in Dream Maker, just hit the F1 button). Trying to use view without the parenthesis should be throwing a compiler error. That tells me that the code that you've posted probably isn't the code that's running. When you try and compile, is it actually compiling, or are you getting errors?

Second, are you sure that S.Gowner == usr? It could just be that there are no Wshurikens in view (again, what is view here?) that have Gowner == usr. Again, you need to throw out some diagnostic messages, such as:
                world << "Gowner equals: [Gowner]"
if(S.Gowner==usr)
world << "Check passed. Checkpoint: 4"


I can't really fix your problem, but that's because you havn't given me enough information to know what's wrong. Next time you post, please include diagnostic information, and we'll be able to give you a much more useful answer.
Follow the IainPregrin advice, it's pretty useful to know where your code is failing, maybe accidentaly firing is setted to 1 when you try to use it, try something like

mob/shurikenmove
verb
Demon_Wind(mob/M in view)
set category="Jutsus"
set name = "Demon Wind Shuriken"
if(usr.firing)
usr<<"Firing is setted to 1!"
return
if(usr.chakra<=10000)
usr<<"Not enough chakra."
return
for(var/obj/Wshuriken/S in view)
usr<<"Wshuriken was detected, Owner: [S.Gowner]"
if(S.Gowner==usr)
usr<<"Congrats! you are the shuriken's owner!"
S.icon = usr.icon
S.overlays += usr.overlays
view(usr)<<"<font size=1><font face=verdana><b><font color=white>[usr]<font color=green> Says: Demon Wind Shuriken: Windmill of Shadows!"
var/obj/kunai/K = new()
K.Gowner = usr
K.tai = usr.tai
K.loc = S.loc
sleep(3)
walk(K,M)
sleep(50)
del(K)
del(S)
usr.chakra-=10000
usr.Chakragain()


And all that stuff
oh and I think view have as default a dist of 5, so get sure you aren't too far away.

And grats on the naruto rip!! :P

In response to Frolik
It's stupid to say it's a rip without actually any evidence on it.
In response to Andre-g1
Actually it uses all the vars and the same structure than a rip, and im talking about using a premade code, not an icon rip...
In response to Frolik
So.. ? If I used a var called firing, a var called Gowner and a var called chakra/tai would that make my code auto-rip ?

Gowner I find quite a bit hard to understand what's the G for, but the rest are reasonable.
In response to Andre-g1
Its a rip, if not, then its certainly using ripped programming, thats for sure.