IM writing a script where you can type !suggest suggestion here to the bot and it would save that, I have it done but without hash table, and Id like to use one everyone seems to like them, I looked in help and I sorta get it but I was wondering if someone could just give me a push start. I was planning on storing The suggest who made it when they made it and their userhost. Im not asking fo ryou to write it just a hin or push start
/hadd tablename nick $address($nick,3) $ctime suggestion
note:
1. always store times in ctime format - makes for easy calculations should you ever want them. added advantage: it's only one word
2. put the suggestion last. everything else is only one word, so you can easily extract all information
For more info:
hash table tutorial by Pasmal
I'd first want to create the has table and then set it to load when I start mirc and save when I quit correct?
OKay first I make the table /hmake -s suggestion 10
Then I have a remote
on 10:text:!suggest*:*:/hadd -s suggestion $nick $address($nick,3) $ctime $2-
//echo -a The first item found in the suggestion is $hget(suggestion,1).item
Will return the nick that did it but it wont store anything after the nick
What he has would work, just everywhere and not only in a channel.
The $hget(table,1).item returns the item that happens to be in slot one. Hash tables are not sorted in any way. To get the info about the user,
var %user = $hget(tablename,1).item
var %info = $hget(tablename,%user)