Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using switch_ic the break() function gives a compile error #1351

Closed
Sketsi opened this issue Jan 28, 2023 · 1 comment
Closed

Using switch_ic the break() function gives a compile error #1351

Sketsi opened this issue Jan 28, 2023 · 1 comment

Comments

@Sketsi
Copy link

Sketsi commented Jan 28, 2023

When I changed switch to switch_ic the break() in console spits out
"COMPILE ERROR: The break() function can only break out of loops."

Works:

/switch $ = >>>
 switch($){
   case '1':
     msg('one')
     break()
   case 'two':
     msg('2')
     break()
   default:
     msg('That number is too high for me.')
 }
<<<

Doesn't work:

/switch $ = >>>
  switch_ic($){
    case '1':
      msg('one')
      break()
    case 'two':
      msg('2')
      break()
    default:
      msg('That number is too high for me.')
  }
<<<

Console:

[19:42:45 INFO]: COMPILE ERROR: The break() function can only break out of loops.
[19:42:45 INFO]: at :C:\Users\Zack\Desktop\Skyblock Dev\plugins\CommandHelper\aliases.msa:5.7
[19:42:45 INFO]:
[19:42:45 INFO]: COMPILE ERROR: The break() function can only break out of loops.
[19:42:45 INFO]: at :C:\Users\Zack\Desktop\Skyblock Dev\plugins\CommandHelper\aliases.msa:8.7
[19:42:45 INFO]:
[19:42:45 ERROR]: [CommandHelper] Execution halted due to compile errors.
switch_console
switch_in-game

@Pieter12345
Copy link
Contributor

Fixed in build 313.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants