Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help RandInt and Switch Statements.
Kreekakon Offline
Pick a god and pray!

Posts: 3,063
Threads: 70
Joined: Mar 2012
Reputation: 124
#6
RE: RandInt and Switch Statements.

(04-13-2013, 05:08 PM)NaxEla Wrote: You aren't actually supposed to have those curly brackets after each case. It will cause an error.
Yes you can, however you have to remember to add break; at the end of each one like this:

case min:
{
//do stuff
break;
}
case max:
{
//do stuff
break;
}

[Image: Tv0YgQb.gif]
Image by BandyGrass
04-13-2013, 05:23 PM
Find


Messages In This Thread
RE: RandInt and Switch Statements. - by NaxEla - 04-13-2013, 05:08 PM
RE: RandInt and Switch Statements. - by Kreekakon - 04-13-2013, 05:23 PM
RE: RandInt and Switch Statements. - by NaxEla - 04-13-2013, 05:48 PM
RE: RandInt and Switch Statements. - by Kreekakon - 04-13-2013, 05:57 PM



Users browsing this thread: 1 Guest(s)