ok, I found the problem, kinda, I dont know how or why mirc messes up with these values (I havent bothered to test it further but it screws up the whole hash table and removes these values in my script, and on their own, it just removes them leaving a blank hash table.
(alias command)
/testh {
echo making new hash table: userid
hmake userid 1000
hadd userid who-1 100
hadd userid who-2 5
hadd userid who-3 1
hsave -bo userid test.file
echo saved 3 values, 1: $hget(userid,who-1) , 2: $hget(userid,who-2) , 3: $hget(userid,who-3)
hfree userid
hmake userid 1000
echo loading new values
hload userid test.file
echo loaded 3 values, 1: $hget(userid,who-1) , 2: $hget(userid,who-2) , 3: $hget(userid,who-3)
hsave -bo userid test2.file
echo files created, test.file and test2.file
}
with this code, I get:
making new hash table: userid
saved 3 values, 1: 100 , 2: 5 , 3: 1
loading new values
loaded 3 values, 1: , 2: , 3:
files created, test.file and test2.file