EngineImageGetFilesCount: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
Tag: Manual revert
(Add variable param)
 
Line 7: Line 7:
int engineImageGetFilesCount ( img imgArchive )
int engineImageGetFilesCount ( img imgArchive )
</syntaxhighlight>  
</syntaxhighlight>  
{{OOP||[[img]]:getFilesCount||}}
{{OOP||[[img]]:getFilesCount|filesCount}}


===Required Arguments===  
===Required Arguments===  

Latest revision as of 19:30, 10 April 2023

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(...)
Variable: .filesCount


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