From Scriptwiki
Jump to: navigation, search

Loads a hash table from a file.

/hload -sbni <name> <filename> [section]

This command fills a hash table with the contents of a text file. The first line of the file is treated as the first item, and its data is supposed to be the second line. Third line is the second item and its data is the fourth line etc.

Using the -s switch makes the command display the result (e.g. * Loaded hash table 'users' from 'users.dat')

The -b switch loads binary files.

You can use -n to load files as data only, with no items. When loading with -n each line of data is assigned an N item value, starting at N = 1.

The -i switch treats the file as an ini file. You can specify an optional section name after the filename.

Note that /hload does not create the table, it must already have been created by /hmake.


hload users users.dat

This simple example just loads users.dat into a hashtable called users.

hload -si users users.ini myusers

That one loads the section myusers of the ini called users.ini to hashtable users and displays the result.