• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Switch Case

Status
Not open for further replies.
Level 9
Joined
Sep 28, 2004
Messages
365
Hi all, i am pretty new to JASS and want to know its syntax. However after reading tutorials. I notice that JASS don't support Switch Statement. Is this true? Or if i am wrong. What is the syntax of Switch Statement in JASS?

Example:
JASS:
switch(value)
{
	case 0	:	//code here
	case 1	:	//code here
	case 2	:	//etc..
	default	:	//....
}

Because i find nesting too much If statement is inefficient. Thanks for the help!
 
Status
Not open for further replies.
Top