title: calling a function with a char and a variable number of arguments
body: <p>so what i am trying to do is whenever i touch a button, it calls a function with both a char and some variable number of arguments (in this case two ints that are both worth 24).</p>
  
  <pre><code>- (IBAction)buttonPressed:(id)sender {
  number = 24;
  
  printf_to_debug("some text %d %d ",number, number);
  //printf(" %d %d ",number, number);
  }
  </code></pre>
  
  <p>however, when i call the function it seems to always change my ints to some big number, which i don't understand.</p>
  
  <pre><code>void printf_to_debug (char* fmt, ...) {
  
  va_list args;
  va_start( args, fmt );
  
  printf(fmt, args);
  
  charString = [NSString stringWithUTF8String: fmt];
  charString = [NSString stringWithFormat:charString, args];
  debugTextString = [NSString stringWithFormat:@"%@\r%@",charString, debugTextString];
  
  va_end( args );
  
  
  }
  </code></pre>
  
  <p>does anyone see a problem with my code?</p>