Squirrel/Server/Functions/Ini/RemoveIniValue
From Liberty Unleashed Wiki
(Difference between revisions)
Line 1: | Line 1: | ||
− | + | {{Squirrel/Title|RemoveIniValue}} | |
+ | {{RequiresModule|lu_ini|Modules/Squirrel/lu_ini}} | ||
This function removes a value from an .ini file. | This function removes a value from an .ini file. | ||
Latest revision as of 10:28, 11 October 2010
Note: This function requires the external module lu_ini.
This function removes a value from an .ini file.
[edit] Syntax
bool RemoveIniValue( string file, string section, string key )
[edit] Arguments
- file - The name of the .ini file
- section - The section from where the ini value should be removed
- key - The key to the ini value to be removed
[edit] Example
function onPlayerPart( player, reason ) { RemoveIniValue( "Accounts.ini", player.Name, "LoggedIn" ); }
This will remove the LoggedIn value under the section labeled with the players name in the Accounts.ini when the player leaves.
[edit] Notes
The call onPlayerPart was used in in this example. More info about this in the corresponding page.
[edit] Related Functions
These functions are provided by the official module lu_ini.