mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 111
E
Vogon poet
OP Offline
Vogon poet
E
Joined: Dec 2002
Posts: 111
I am having a really goofy problem with hash table names.

Example code:

Code:
on *:sockread:tempname: {
  sockread -f %tempname
  var %teston = $gettok(%tempname,1,32)
  if (%teston == online) {
    var %tempid = $gettok(%tempname,2,32)
    var %temppass = $gettok(%tempname,3,32)
    var %addname = $gettok(%tempname,4,32)
    var %temppasst = $gettok($hget(friends,system),2,32)
    if (%temppass == %temppasst) {
      sockrename tempname %tempid
      var %addip = $gettok(%tempid,5,32)
      var %addpass = $gettok($hget(friends,%addid),1,32)
      hadd friends %addid %addpass %addname %addip
      hsave friends " $+ $mircdir $+ \mfriends\friends.dat $+ "
      echo [MFriends]  $+ %addname is online!
    }
  }
}


Now, the problem I am having is that for some reason when that code, and ONLY that code is ran, whatever is in %addname will get put into the hash table at random as a new item!

The only reason I can think of why this is happening is because the item name (%addid) is a number. Is it a problem with hash table item names being just numbers?

Joined: Dec 2002
Posts: 111
E
Vogon poet
OP Offline
Vogon poet
E
Joined: Dec 2002
Posts: 111
nevermind hehe, it was late at night. i finally see it :P


Link Copied to Clipboard