Skip to content
Mishin870 edited this page Jul 28, 2018 · 7 revisions

Welcome to the MHScript wiki! MHScript is a JS-like scripting engine for C#, that support script serialization and documentation autogeneration.

Hello world in MHScript:

//If you define a global "alert" function, that shows MessageBox
alert("Hello, world!");

You can create custom global functions and custom types (see respective wiki pages for it).

Script and Engine are very different objects. You can run many scripts on same engine. Engine is a "container" for all global/local functions, variables and standart types (static definitions). Script is just a block with commands (he himself is also a command) and with local functions, that contains commands. All MHScript operations are defined as commands, that execute all of their subcommands and process their results as they wants. When you run scripts in the engine, the engine clears the cached local functions and adds all local script functions to the cache. After that you can call the cached local functions from the C# (as well as from the script itself)

See the how to start page.

Clone this wiki locally