-
Notifications
You must be signed in to change notification settings - Fork 2
Import
PokeJofeJr4th edited this page Aug 11, 2023
·
5 revisions
There comes a time in a program's life when it becomes large enough that it needs to be organized into multiple files. Minescript supports large programs with the @import
annotation. This annotation takes a string as an argument and evaluates the content of the file. The path should be relative to the location of the main source file.
Imports can be used any place you can use a command:
@import "items.txt"
function tick {
if score > 1 {
@import "function.txt"
}
if score <= 1 @import "another_function.txt"
}