DoesPakExist: Difference between revisions
From Onset Developer Wiki
Created page with "{{Info|Function|Client|1.0}} {{FuncDescription|Checks if a pak with the specified name exists.}} {{FuncSyntax|DoesPakExist(PakName)}} {{FuncParameters}} {{FuncParam|PakName..." |
No edit summary |
||
Line 11: | Line 11: | ||
== Example == | == Example == | ||
<syntaxhighlight lang="Lua"> | |||
local pakname = "TestMod" | |||
print("Pak exists: ".. DoesPakExist(pakname) and "True" or "False" .. ".") | |||
</syntaxhighlight> | |||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
{{Template:PakFunctions}} |
Revision as of 07:09, 30 December 2019
Description
Checks if a pak with the specified name exists.
Syntax
DoesPakExist(PakName)
Parameters
- PakName
The name of the Pak file without extension.
Return Value
- Returns true when the Pak exsits.
Example
local pakname = "TestMod"
print("Pak exists: ".. DoesPakExist(pakname) and "True" or "False" .. ".")