mIRC Homepage
Posted By: Solo1 /hload ? - 05/01/08 09:41 PM
Greetings

I am having problems with /hload this is what i am doing

/hmake lol
/hsave lol lol
/hfree lol
/hload lol lol

-
* /hload: no such table 'lol'


I have checked my folder and the has table lol is present i have tried with .hsh extension to no avail..

What am i doing wrong???

Posted By: starbucks_mafia Re: /hload ? - 05/01/08 09:43 PM
You need to /hmake the table before you /hload it.
Posted By: Solo1 Re: /hload ? - 05/01/08 09:53 PM
Hi, See my post, i did /hmake it
Posted By: Collective Re: /hload ? - 05/01/08 09:55 PM
You made it then you /hfree'd it, which means you'll have to make it again.
Posted By: Solo1 Re: /hload ? - 05/01/08 10:03 PM
but i /hsaved it? if i remake it then won't it delete the old data? and i tried without using /hfree just saving it then restarting my client and then trying to load it, it wont work
Posted By: starbucks_mafia Re: /hload ? - 05/01/08 10:10 PM
Quote:
i tried without using /hfree just saving it then restarting my client and then trying to load it, it wont work

Hash tables aren't persistent. That means unlike variables, mIRC doesn't keep track of them when you close mIRC and restart it. So if you /hmake a hash table and then restart mIRC you will need to /hmake it again.

/hsave also doesn't change that fact. All /hsave does is store the contents of the hash table in a file. It is your (the scripter's) responsibility to /hmake and /hload the contents of that file into the hash table again if you close mIRC or /hfree the table.
Posted By: Solo1 Re: /hload ? - 05/01/08 10:33 PM
Thank-You for your time and help, much appreciated.
© mIRC Discussion Forums