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
switch statements
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#8
RE: switch statements

Just found out that you can't use strings as cases in a switch function. The values needs to be an integer. There's functionality for string use in switch-case functions, but not for AngelScript I guess Sad

Just resort to if statements. I'll try to find a nice way to use switch statements with strings, as I personally think they are much cleaner and easier to read for someone trying to learn from your script.

07-22-2011, 10:34 AM
Find


Messages In This Thread
switch statements - by DRedshot - 07-20-2011, 08:00 PM
RE: switch statements - by Khyrpa - 07-20-2011, 08:24 PM
RE: switch statements - by Kyle - 07-20-2011, 08:31 PM
RE: switch statements - by Khyrpa - 07-20-2011, 08:38 PM
RE: switch statements - by DRedshot - 07-20-2011, 08:42 PM
RE: switch statements - by palistov - 07-20-2011, 08:46 PM
RE: switch statements - by DRedshot - 07-20-2011, 08:49 PM
RE: switch statements - by palistov - 07-22-2011, 10:34 AM



Users browsing this thread: 1 Guest(s)