Blockland Forums > Modification Help
My first chat bot (NEED HELP AGAIN)
<< < (7/7)
jes00:

--- Quote from: Uxie on August 19, 2011, 11:41:17 AM ---What does break do? I dont think I've ever heard of that.

--- End quote ---
Err I don't know, but without it the chat bot won't work.
MegaScientifical:

--- Quote from: Uxie on August 19, 2011, 11:41:17 AM ---What does break do? I dont think I've ever heard of that.

--- End quote ---

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
Flood:
Once Again

You need 2 } then a };
Headcrab Zombie:

--- Quote from: MegaScientifical on August 19, 2011, 12:33:17 PM ---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

--- End quote ---
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.
MegaScientifical:
You don't need breaks in Torque's switches.
Navigation
Message Index
Previous page

Go to full version