Vendetta/API/resolve file

From Quasar-RCE
Jump to navigationJump to search

Definition

lib.resolve_file (path, ...) :: nil

Description

Attempts to load and execute a file using a variety of path options. This function attempts to make file loading behavior consistant across the game's state.

Arguments

  1. string filepath: path to the file to be accessed
  2. string ...: alternate path(s) to check

Returns

  1. boolean status: true if the file loaded successfully
  2. ...: results of the file, or a string error message

Other notes

  • Added in LME 2.x (Neoloader indev)
  • This function uses lib.find_file to verify the file exists, and will always execute the first found path.
  • The file being executed will likely be loaded with pcall(), depending on the LME's "protectResolveFile" flag