title: illegal call of non-static member function
body: <p>I'm having trouble with this function below:</p>
  
  <pre><code>char* GetPlayerNameEx(int playerid)
  {
  
      char Name[MAX_PLAYER_NAME], i = 0;
  
      GetPlayerName(playerid, Name, sizeof(Name));
  
      std::string pName (Name);
  
      while(i == 0 || i != pName.npos)
      {
          if(i != 0) i++;
          int Underscore = pName.find("_", i);
          Name[Underscore] = ' ';
      }
      return Name;
  }
  </code></pre>
  
  <p>declaration: </p>
  
  <pre><code>char* GetPlayerNameEx(int playerid);
  </code></pre>
  
  <p>usage:</p>
  
  <pre><code>sprintf(string, "%s", CPlayer::GetPlayerNameEx(playerid));
  </code></pre>
  
  <p>Now my problem here is</p>
  
  <p>Removed personal information.</p>
  
  <p>If this has anything to do whith it which I doubt it does, this function is contained within a "Class" header (Declartion).</p>
  
  <p>Also I have no idea why but I can't get the "Code" box to fit over correctly.</p>