HyperScript 1.7.12
Version 1.7.12
Big change
Check your scripts before updating to 1.7.12
- A file with mistakes now reports one for each part that has any, not only the first: each command, event and function is checked on its own. The console,
/hs reload,/hs checkand/hs errorsall list them. The file is still loaded as a whole or not at all, as before. The first mistake listed is always the real one; a later one can be a knock-on of an earlier. - The note about
{player.something}is gone. 1.7.3 said it had been removed; in fact only the setting and the documentation were, and the note was still printed. It is removed now. SpeedTest.hsis no longer among the ready-made scripts./hs speedreplaces it. A copy already on a server keeps working.
A file's mistakes are now all reported at once, there is a built-in speed test, and the playground on the website runs scripts, on the visitor's own computer.
Changed (check your server)
- A file with mistakes now reports one for each part that has any, not only the first: each command, event and function is checked on its own. The console,
/hs reload,/hs checkand/hs errorsall list them. The file is still loaded as a whole or not at all, as before. The first mistake listed is always the real one; a later one can be a knock-on of an earlier. - The note about
{player.something}is gone. 1.7.3 said it had been removed; in fact only the setting and the documentation were, and the note was still printed. It is removed now. SpeedTest.hsis no longer among the ready-made scripts./hs speedreplaces it. A copy already on a server keeps working.
Added
/hs speed
- Measures how fast scripts run on the server, in twelve sections: local variable, arithmetic, conditions, function calls, building text, reading a list, colour codes, temporary variable, saved variable, a player's own variable, asking for a block, asking for health.
- For each section it first finds a number of rounds that takes long enough to time, then runs that 25 times and reports the middle result as "this many a second".
- It is spread over ticks, a few thousandths of a second at a time, so the server keeps running. Run from the console, the three sections that need a player are left out.
Website
- The playground runs scripts. Type a command (
/hello Alex) or an event (on join) and press Run: the script is run against a pretend server with one pretend player, and a Log tab shows, in order, everything it told the server to do, with how long reading and running took. Nothing really happens, and awaitdoes not wait. - It runs on the visitor's own computer. HyperScript itself, the same code as the plugin, runs in the browser page, so scripts are not sent anywhere. The first use fetches a Java runtime for browsers (CheerpJ, from its maker's servers) and the plugin jar, which took about seven seconds when tried; after that a run takes a fraction of a second. If that cannot start, the website's own server does the work instead, as before.
- The playground lists the script's commands and events as buttons to run, and has Mistakes and Log tabs under the box.
- Usage numbers are kept in
Servers/Data.jsonbesideapp.py, so a restart of the site no longer forgets them. The folder is not served to anybody.SAVE_ANALYTICS=FALSEin.envkeeps them in memory only.
Things to know
- The playground loads a script from another company's servers (CheerpJ) when a visitor presses Check or Run. It is free for personal and open-source use; check its licence if the site ever becomes commercial. Without it the playground still works, through the site's own server.
- Times shown in the playground's log are for the browser, where Java is many times slower than on a server.
/hs speedgives real numbers.