Vendetta/API/get path: Difference between revisions

From Quasar-RCE
Jump to navigationJump to search
created get_path
 
Luxen (talk | contribs)
Added LME 3.12.x behavior of get_path
 
Line 3: Line 3:


=== Description ===
=== Description ===
Retrieves the path value of the installed mod
Retrieves the path value of the function that called this function, or if an ID/version pair are provided, returns the path to the installed mod


=== Arguments ===
=== Arguments ===
Line 10: Line 10:


=== Returns ===
=== Returns ===
# string file_path: The path to the mod's folder; example: "plugins/Neomanager/"
If called with no arguments (or invalid arguments)
* string file_path: The path to the folder of the file that called this function
OR, if string id/version are provided:
* string file_path: The path to the mod's folder; example: "plugins/Neomanager/"


=== Other notes ===
=== Other notes ===
* Added in LME 3.1.x
* Added in LME 3.1.x
* This path is based on the location of the mod's INI registration file
* Updated in LME 3.12.0: Now can return the path to the file that executed this function
* (with an ID/Version pair) This path is based on the location of the mod's INI registration file

Latest revision as of 20:14, 21 July 2025

Definition

lib.get_path (id, version) :: file_path_pointer

Description

Retrieves the path value of the function that called this function, or if an ID/version pair are provided, returns the path to the installed mod

Arguments

  1. string id: name of the mod to be retrieved
  2. string version: version of the mod to be retrieved

Returns

If called with no arguments (or invalid arguments)

  • string file_path: The path to the folder of the file that called this function

OR, if string id/version are provided:

  • string file_path: The path to the mod's folder; example: "plugins/Neomanager/"

Other notes

  • Added in LME 3.1.x
  • Updated in LME 3.12.0: Now can return the path to the file that executed this function
  • (with an ID/Version pair) This path is based on the location of the mod's INI registration file