This function counts the items in the given .ini file section.
- int CountIniSection( string file, string section )
- file - The name of the .ini file
- section - The section from which the items should be counted
- function onPlayerCommand( player, cmd, text )
- if ( cmd == "clountsection" )
- if ( text ) MessagePlayer( "Section Count: " + CountIniSection( text, player.Name ), player );
This will count the section which is labeled as the players name in the given ini file and return it in a message to that player.
The call onPlayerCommand was used in in this example. More info about this in the corresponding page.
These functions are provided by the official module lu_ini.