Squirrel/Server/Functions/Ini/DeleteIniSection

From Liberty Unleashed Wiki
Revision as of 01:28, 8 March 2010 by Force (Talk | contribs)

Jump to: navigation, search

This function removes a whole section from an .ini file.

Syntax

  1. bool DeleteIniSection( string file, string section )

Arguments

  • file - The name of the .ini file
  • section - The section which should be deleted

Example

  1.  
  2. function onPlayerCommand( player, cmd, text )
  3. {
  4. if ( cmd == "delsection" )
  5. {
  6. if ( text ) DeleteIniSection( text, player.Name );
  7. }
  8. }
  9.  

This will delete the section labeled as the players name in the given ini file.

Notes

The call onPlayerCommand was used in in this example. More info about this in the corresponding page.


Related Functions

These functions are provided by the official module lu_ini.

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox