mirror of https://github.com/Hilbis/Hilbish
chore: change lua init errors to make more sense
parent
0642ddda36
commit
c4eb3ad368
4
lua.go
4
lua.go
|
@ -51,14 +51,14 @@ func luaInit() {
|
||||||
// Add more paths that Lua can require from
|
// Add more paths that Lua can require from
|
||||||
err := util.DoString(l, "package.path = package.path .. " + requirePaths)
|
err := util.DoString(l, "package.path = package.path .. " + requirePaths)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintln(os.Stderr, "Could not add preload paths! Libraries will be missing. This shouldn't happen.")
|
fmt.Fprintln(os.Stderr, "Could not add Hilbish require paths! Libraries will be missing. This shouldn't happen.")
|
||||||
}
|
}
|
||||||
|
|
||||||
err = util.DoFile(l, "nature/init.lua")
|
err = util.DoFile(l, "nature/init.lua")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
err = util.DoFile(l, preloadPath)
|
err = util.DoFile(l, preloadPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintln(os.Stderr, "Missing preload file, builtins may be missing.")
|
fmt.Fprintln(os.Stderr, "Missing nature module, some functionality and builtins will be missing.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue