IsConfigMissing
This function was added in DSL 1
Description
Since LoadConfigFile still returns a valid config object when the requested config doesn't exist, you'll need to use this function to check if it actually exists or not.
function IsConfigMissing(config) --[[ ... ]] end
Parameters
config:userdata- The config object to check.
Return Values
missing:boolean-trueif the config is missing,falseotherwise.
Example
local config = LoadConfigFile("my_config.ini")
if IsConfigMissing(config) then
print("Config file is missing!")
else
print("Config file loaded successfully!")
end
See Also
- DSL