ID:262647
 
Code:
turf
can_attack
icon = 'stealth.dmi'
if(usr.char_clan = "Uchiha")
Entered()
usr.verbs+=/mob/verb/Attack
usr.verbs+=/mob/verb/Bunshin_No_Jutsu
usr.verbs+=/mob/verb/Kawarimi_no_Jutsu
usr.verbs+=/mob/verb/Mei_Mei_No_Jutsu
usr.verbs+=/mob/verb/Katon_Goukakyuu_no_Jutsu
usr.verbs+=/mob/verb/Shushin_no_Jutsu
usr.verbs+=/mob/verb/Henge_No_Jutsu
usr.verbs+=/mob/verb/Doton_Doryo_Dango
usr.verbs+=/mob/verb/Jouro_Senbon
usr.verbs+=/mob/verb/Oiroke_No_Jutsu
usr.verbs+=/mob/verb/Quick_Move
usr.verbs+=/mob/uchiha/verb/Sharingan_1
Exited()
usr.verbs-=/mob/verb/Attack
usr.verbs-=/mob/verb/Bunshin_No_Jutsu
usr.verbs-=/mob/verb/Kawarimi_no_Jutsu
usr.verbs-=/mob/verb/Mei_Mei_No_Jutsu
usr.verbs-=/mob/verb/Katon_Goukakyuu_no_Jutsu
usr.verbs-=/mob/verb/Shushin_no_Jutsu
usr.verbs-=/mob/verb/Henge_No_Jutsu
usr.verbs-=/mob/verb/Doton_Doryo_Dango
usr.verbs-=/mob/verb/Jouro_Senbon
usr.verbs-=/mob/verb/Oiroke_No_Jutsu
usr.verbs-=/mob/verb/Quick_Move
usr.verbs-=/mob/uchiha/verb/Sharingan_1
mob/var
char_clan = ""


Problem description: Why am i getting these errors?tiles.dm:402:error:usr.char_clan:undefined var
tiles.dm:402:error::empty type name (indentation error?)
tiles.dm:403:error::empty type name (indentation error?)


One thing(That I can see) change the if to:
if(usr.char_clan == "Uchiha")

You always have to have 2 symbols ie. += , *= in if statements.

In addition to what Mecha said, it would save you a lot of space to move the Jutsu verbs to another mob type or something, then make it to where usr.verbs+=typesof(/mob/verbbox/verb/).
When dealing with such locations where you can or not attack, it would be better to use an area instead of a turf. With an area, the entire block is considered one area, and the Entered and Exited procs will only run once.

I also find it strange that you are using a can attack turf. Usually in games, there are fewer places where you cannot attack and would better to have an area that disables attack than one that enables them. Although, you may possibly have a good reason for it, I am curious.

I also notice that you have a lot of verbs being subtracted and added that would not be confined to one clan. In order to avoid having to rewrite the common verbs over and over, I would suggest to have them out of the clan check.

Also, when dealing with the Entered and Exited procs, the if statement goes inside of the proc. Such as:
Entered()
switch(usr.char_clan)
if("Uchiha")
usr.verbs-=typesof(/mob/uchiha/verb)
if("Other Random Clan Name")
The reason for getting the undefined variable is that you had if(usr.char_clan = "Uchiha") outside of any procs. When you want to see if something equals something within an if() statement you want to use == rather than =.

Other than that which everyone overlooked is user abuse. Enter(), Entered(), Exit() and Exited() all take an argument which is what is doing the enter[ing]/exit[ing].

Ie:
Entered(atom/A)
if(ismob(A))
var/mob/M=A
if(M.char_clan=="Uchiha")
M.verbs+=/mob/verb/Attack
//etc...
In response to Nick231
Yes, if the game incorporates NPCs or other moving objects, it would be a good idea to use mobs instead, since it would error otherwise by using usr. Also, if you have mobs that are NPCs that you do not wish to be affected by the proc, it can also be good to do a client check. Which can be done by either saying if(usr) or if(M.client).