This function should only be called in a Path Handler script.
Returns the path of the file being handled.
Syntax
GetPath()Arguments
No arguments.
Return Values
- (string): The path of the file being handled.
Examples
local CurrentPath = GetPath()
if ComparePaths(CurrentPath, "scripts\\missions\\rewards.mfk") then
-- Do something based on it being the rewards file.
else
-- Do something else, nothing probably with this example
endVersion History
Version 1.24
Fixed a major issue where Lua functions that are only supposed to work when handling a path (Output, Redirect, GetPath, IsWriting and UseCallbacks) could be called in a UseCallbacks callback but would not work properly. Now they cannot be called in this case.