ReadIniInteger
From Liberty Unleashed Wiki
Note: This function requires the external module lu_ini.
This function reads an integer value from an .ini file.
Syntax
int ReadIniInteger( string filename, string section, string var )
Arguments
- filename This is the name of the file
- section The section that contains the value you want to read
- var The name of the variable
Example
This example will restore the cash amount player had on a previous visit.
function onPlayerJoin( player ) { local cash = ReadIniInteger( "PlayerCash.ini", "Cash", player.Name ); if ( cash ) { player.Cash = cash; } }
Notes
The function Player.Cash and call onPlayerJoin were also used in in this example. More info about them in corresponding pages.
Related Functions
These functions are provided by the official module lu_ini.