mIRC Home    About    Download    Register    News    Help

Print Thread
#72664 24/02/04 01:16 PM
Joined: Aug 2003
Posts: 44
C
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Aug 2003
Posts: 44
Code:
//var %i = 1 | while (%i <= 10) { hadd -m test %i test | inc %i } | echo -a $hget(test,1).item | hfree test

Gives me "3".....always.
Why?
Shouldn't it be 1?
Please help me, maybe I overlooked something.

Thanks in advance.

Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
The problem is that hash tables don't store items in any specific order (at least, not any order that is relevant or useful to us), and by using the .item property of $hget() you've told mIRC that the item you've given is actually a numeric index rather than an item name.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Apr 2003
Posts: 414
Fjord artisan
Offline
Fjord artisan
Joined: Apr 2003
Posts: 414
KingTomato wrote:
Has tables use whatever available memory they can. Saving them is a matter of finding an empty location in memory (or paging file) and putting it there. Exporting just does through the memory locations and exports it. You're dealing with very large memory cell locations, not lines in a text file.


mIRC Chm Help 6.16.0.3 Full Anchored!
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
And of course, excuse the typos wink


-KingTomato

Link Copied to Clipboard