EngineImageGetFilesCount

From Multi Theft Auto: Wiki
Revision as of 15:27, 10 April 2023 by TheNormalnij (talk | contribs) (Created page with "__NOTOC__ {{Client function}} This function returns the number of files an IMG file has. ==Syntax== <syntaxhighlight lang="lua"> int engineImageGetFilesCount ( img imgArchive ) </syntaxhighlight> {{OOP||img:getFilesCount||}} ===Required Arguments=== *'''imgArchive:''' the IMG archive handler ===Returns=== Returns an ''int'' with the number of files. ==Example== You could use the following code: <syntaxhighlight lang="lua"> local img = engineLoadIMG( "file.im...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function returns the number of files an IMG file has.

Syntax

int engineImageGetFilesCount ( img imgArchive )

OOP Syntax Help! I don't understand this!

Method: img:getFilesCount(...)


Required Arguments

  • imgArchive: the IMG archive handler

Returns

Returns an int with the number of files.

Example

You could use the following code:

local img = engineLoadIMG( "file.img" )
local count = engineImageGetFilesCount( img )
outputChatBox("'file.img' has " .. count .. " files")

See Also