ID:144622
 
Code:
mob
verb/BunshinNoJutsu()
set name = "Bunshin no jutsu"
set desc = "Create a clone"
set category = "Jutsus"
usr.Handseals()
if(usr.TT ==1)
usr << "You practice your Bunshin jutsu"
sleep(10)

usr.random = rand(1,4)
if(usr.random = 1)
sleep(20)
usr << "Your Bunshin skill grows"
usr.BunshinN += 1
if(usr.BunshinN >= 15)
usr << "You can now preform Bunshin effectivly!"
return


Problem description:

Right after the "You practice your bunshin no jutsu" it says that the sleep(10) an invalid expression. I have no clue wat that means. And if i delete it it just moves to the next line down and says invalid expression..I have had this problem before on my rips when coding but i just said F*** that peice of code, but now thatim making an original game i need to have this working. Please help me out.

SS10trunks wrote:
Code:
>               if(usr.random = 1)
>



your problem is right there, you need another = sign.

Another thing, look up boolean variables. if(condition)and if(!condition) :P True and false.
You don't indent on sleep. Take every line you've indented after "usr << "You practice your Bunshin jutsu"" back one tab. Also, what's the point of storing a random variable under mob permanently? Also, you need two = signs when you check the random variable.

I'd normally say something about usr.TT because it looks like a boolean variable and checking it the way you do isn't very robust, but there simply isn't enough information. If it is boolean, however, you want if(usr.TT).
In response to Mechanios
i tried the (!variable) thing but that didnt work..i did everything i could before i asked this, but i added another = sign to the usr.random = rand(1,4) if(usr.random == 1) and it didnt work.
In response to CaptFalcon33035
ok i forgot bout the indenting sleep thing, thanks falcon.