title: Node.js with Redis - Sorted sets addition
body: <p>I'm trying to make a list of URLs using node_redis. In the code below I'm getting the length on the sorted set and adding elements to that position of the set.</p>
  
  <pre><code>client.on('connect', function() {       
      client.zcard('url',function(err, reply) {
          if (reply == undefined) {
              length = 0;
          } else {
              length = reply;
          }
      });
      client.zadd('url',length,pagename,function(err1, reply1) {
          console.log("added="+reply1);
      });             
      client.zrange('url',0,-1,'withscores',function(err2, reply2) {
          console.log(reply2);
      });
  });
  </code></pre>
  
  <p>My issue is that <code>reply1</code> returns undefined which means that <code>length</code> is not assigned the length of the set by the previous piece of code. What am I doing wrong here?</p>