mIRC Homepage
Posted By: DJ_Sol Saving Hash Tables - 26/02/09 09:26 PM
Hello. For the past 3 years I have been saving hash tables to a txt file. Sometimes I see corrupted data. The item is actually the data from the prvious item, and the data for this field is the item from the next item orphaning the data attached to it.

Anyone else experience this issue? I'm wondering if this has to do with the formatting of the txt file. Will it make such a difference if I used a made up extension like .hsh or something?
Posted By: Horstl Re: Saving Hash Tables - 26/02/09 09:49 PM
I didn't; the file extension doesn't matter and you don't have to use one at all:
Code:
hadd -m test item1 data1
hadd test item2 data2
hsave test noextension
hfree test
hmake test
hload test noextension
echo -a $hget(test,item2)
.remove noextension
Extensions like .hsh are for end user convenience, they don't affect how mIRC will handle the file/data internally.

- save/load in binary format if item/data contains $cr/$lf's
- the editor you open the file with may interpet these "special chars"; the display may *appear* wrong. You shouldn't edit hsaved data in an editor anyway - just in case you do smile
Posted By: DJ_Sol Re: Saving Hash Tables - 26/02/09 10:03 PM
I dont edit the info from an editor, my scripts do it all.

I don't think it is an issue with mIRC. I'm wondering if it is an issue with Windows and the format of a txt file messing up the character that seperates the data.

However, I did look at the hash table with a dialog that reads hash tables, but in the actual file I see the same errors.

© mIRC Discussion Forums