title: How to draw a line with Cocos2d-iPhone
body: <p>I'm trying to get to grips with Cocos2d by trying to accomplish simple things. At this point, I have a scene, that scene has a background sprite, and a Layer. I'm trying to draw onto the Layer using drawLine. Here's my current attempt. </p>
  
  <pre><code>@implementation MyLayer
  -(id)init{
      self = [super init];
      if(self != nil){
          glColor4f(0.8, 1.0, 0.76, 1.0);  
          glLineWidth(2.0f);
          CocosNode *line = drawLine(10.0f, 100.0f,400.0f,27.0f);
          [self addChild:line z:1];
      }
      return self;
  }
  @end
  </code></pre>
  
  <p>Which generates the error "void value not ignored as it ought to be". So obviously I'm doing it wrong, but hopefully you can see my reasoning. </p>
  
  <p>I've also tried this</p>
  
  <pre><code>-(id)init{
      self = [super init];
      if(self != nil){
          glColor4f(0.8, 1.0, 0.76, 1.0);  
          glLineWidth(2.0f);
          drawLine(10.0f, 100.0f,400.0f,27.0f);
      }
      return self;
  }
  </code></pre>
  
  <p>Which doesn't give me an error, but it doesn't work either. I realise I'm not understanding something fundamental, but can anyone steer me in the right direction?</p>