Skip to content

CommandHelper 3.3.1

Compare
Choose a tag to compare
@LadyCailin LadyCailin released this 27 Jan 20:23
· 2130 commits to master since this release

3.3.1 is a culmination of almost 4 years of work. There are hundreds of new functions, and tons of bugfixes and new functionality.
Update Breakages

Extensions that worked previously can now only work with the latest builds. All extensions will need to be updated.
New feature overview

  • Closures were added. Many methods require a closure, but you can use closures in custom code as well.
  • Smart Strings. Variable interpolation in strings quoted with double quotes, "@likeThis".
  • Local Packages. Group your code into logical batches.
  • MSLP files. Use the MSLP maker cmdline tool to distribute your code in a single file.
  • Operators. Instead of using add(2, 2), use 2 + 2.
  • Script optimization. Many backend changes have been made to make your scripts run even faster, with no effort on your part
  • Brace Syntax. Use braces in more places: if(@condition){ }, for instance. Makes your code much easier to read.
  • Switch statements. Rewrite large chains of if/else if into the better looking switch statement.
  • while/dowhile loops. Some loops can be more easily written using these mechanism.
  • SQL. Connect to MySQL, SQLite, and PostgreSQL databases.
  • Cmdline. Like MethodScript? Use it anywhere! Run scripts from the command line, and do some neat cmdline only things.
  • Persistence Network. Store your data in lots of different formats, not just the built in serialization format.
  • PN Viewer UI. View your data using a GUI, instead of messing around with command line stuff. Connect to a remote server even, so you can run the GUI on your desktop, and manage your headless server.
  • Code Profiler. Profile your code, to find where the slow spots are.
  • Byte Arrays. Manage bits and bytes.
  • Extensions. Not officially supported yet, but generally quite useful. Add your own functions, or get extensions from other people to extend MethodScript.
  • HTTP functions. Connect to a website, and download information from the web, then use it in your application. Allows for SOAP, REST and other web based connections
  • Removal of PermGen requirements. No longer will you need to edit your PermGen settings, a new backend is now in use.
  • Shell functions. Run other executables on the system.
  • Typing. typeof() instanceof() and other methods have been added to allow you to more easily manage your data types.
  • // is a line comment. Use the traditional C-style line comment in your code.
  • function_exists/event_exists/compile_error. Using these special functions, make your code work with different versions of MethodScript.
  • 0b and 0x. Write hex and binary numbers directly in code. 0xF == 0b1111 == 15.
  • Well definied array iteration. When adding and removing values while iterating arrays in foreach, they do what you want in more cases.
  • Email support. Easily send an email from your scripts with the email() function.
  • Type hinting. Make sure your variables pick a type and stick with it. Type hinting is now implemented, and will eventually be upgraded into strong typing. int @int = 'not an int'; is now an error.
  • Fully supported try/catch blocks. Catch multiple exception types and do different things for each. Finally clauses also supported.

407 functions were added, and 76 events were added. See the changelog on the wiki for full details.