Squirrel/Server/Functions/Ini/RemoveIniValue

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
 
Line 1: Line 1:
__NOTOC__
+
{{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

Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events
Note: This function requires the external module lu_ini.

This function removes a value from an .ini file.

[edit] Syntax

  1. 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

  1.  
  2. function onPlayerPart( player, reason )
  3. {
  4. RemoveIniValue( "Accounts.ini", player.Name, "LoggedIn" );
  5. }
  6.  

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.

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox