Scripting/Squirrel/Functions/Ini/RemoveIniValue
From VC-MP Wiki
This function deletes a selected value from an ini file.
Syntax
RemoveIniValue( string FileName, string Section, string Value )
Arguments
- FileName - This is the file name
- Section - The section name. Use without "[" and "]"
- Value - What do you want delete
Example
To see how this works, let's create (again) a sample ini file 'numbers.ini'. You can copy and paste this:
[no idea for name] 1 = 1 2 = fgh [spam] 2 = 1 asd = 69 [end] end = yeah
Now we want to delete the line where is '2 = 1'. Let's do this, when the server starts.
function onServerStart() { RemoveIniValue( "numbers.ini", "spam", "2" ); }
After this check the ini file. It should look like this:
[no idea for name] 1 = 1 2 = fgh [spam] asd = 69 [end] end = yeah
Notes
The call onServerStart was used in in this example. More info about this in the corresponding page.
