Author Topic: My first chat bot (NEED HELP AGAIN)  (Read 2553 times)

What does break do? I dont think I've ever heard of that.
Err I don't know, but without it the chat bot won't work.

What does break do? I dont think I've ever heard of that.

It stops the current function from continuing. Mainly used in for loops to prevent it from doing anymore loops past a solution. Although I don't remember using it in switch, I think that helps remove 3-4 processes from the game. XD

Once Again

You need 2 } then a };

It stops the current function from continuing. Mainly used in for loops to prevent it from doing anymore loops past a solution. Although I don't remember using it in switch, I think that helps remove 3-4 processes from the game. XD
Not the current function, that would be return. But yes, it breaks out of the current loop. As for breaks in switches, in some languages, if you don't use breaks, it will do the code in all the cases below the proper case. I don't know if TorqueScript does this, I've always used breaks out of habit of working with other languages that do work this way.

You don't need breaks in Torque's switches.