Play Strawberry Docs

When a file is broken

What happens when a mini-script has a mistake, and how to find and fix it.

A file with a problem does not load

The server checks a mini-script completely before it replaces anything. If the new file has any problem, it does not load at all, and the version that ran before keeps running. Players notice nothing while you fix it.

The tab shows Has errors, and The previous version is running. when an older version runs. A mini-script that never loaded does not run.

Find the problem

Every problem names the line and column where it starts, with a sentence in your language. The editor marks the place and lists up to 50 problems of one file. The console prints one line per problem:

text
Mini-script hi has errors: 1.
  line 4, column 11: This text has no closing quote.

This is the file. The message line is missing its closing quote:

text
uses message
command /hi
  permission everyone
  message "v2
end

A problem with the whole file, such as text that is not UTF-8 or a file that is too big, has no line.

Common problems

  • A text without its closing quote: "This text has no closing quote."
  • A block without end: "The if opened on line 8 has no end." The line is the one that opened the block.
  • An action that is missing from uses: "This needs teleport in the script's uses line."
  • A permission you have to allow: the tab says Needs your permission. See Permissions.
  • A name that does not exist: "teleportt is not something a script can do.", "foo is not a function." or "count has no value here; set it first."
  • A command without a permission line: "Say who may use /name: permission everyone, permission op or permission <name>."
  • A command another mini-script already has: "/name is already a command of the mini-script other."
  • A file that is too big: "A mini-script is at most 65536 bytes."

Problems while running

A file that loads can still fail while it runs, for example when a loop passes its limit or a number is divided by 0.

  • That run stops and the console prints Mini-script <name> line <n>: ..., at most five lines per mini-script per minute.
  • The tab keeps the last 10 such problems under While running.
  • When a command fails, the player is told that it did not work.
  • The server goes on, and the mini-script runs again next time.

Saved values that cannot be read

A mini-script whose saved values cannot be read does not load, and the server does not write over them. To start again, copy the text, delete the mini-script with Delete its saved values too ticked, and create it again. The saved values are lost.

From the console

miniscript errors <name> prints the problems of one mini-script as line:column, the text and its code. miniscript list shows the state of each one: loaded, errors or unloaded.

On this page