Aluraa Posted July 20, 2014 Share Posted July 20, 2014 -it is suposed to say "no" when clicked 9 times then say "Hello!" on click number 10 then reset icount to 0.-what its doing is saing "Hello!" every time. anyone know the problem? integer icount = 0;default{ touch_start(integer detected) { if (icount = 10) { llSay(0, "Hello!"); icount = 0; } else { llSay(0, "no"); icount = icount + 1; } }} Link to comment Share on other sites More sharing options...
Dora Gustafson Posted July 20, 2014 Share Posted July 20, 2014 there is a difference between = and == you probably be better of with: if (icount == 10) :smileysurprised::smileyvery-happy: 1 Link to comment Share on other sites More sharing options...
Aluraa Posted July 20, 2014 Author Share Posted July 20, 2014 simple as that. thank you! Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now