Re: [hlcoders] vgui::TextEntry problems

2009-09-20 Thread steven belmans
Well it works now! thanks for all the help darkskidz thanks for the link > Date: Sun, 20 Sep 2009 11:03:45 -0700 > From: darksk...@gmail.com > To: hlcoders@list.valvesoftware.com > Subject: Re: [hlcoders] vgui::TextEntry problems > > Ill contribute with a link to some lig

Re: [hlcoders] vgui::TextEntry problems

2009-09-20 Thread Ryan Sheffer
Ill contribute with a link to some light reading. http://www.cplusplus.com/doc/tutorial/pointers/ Pointers are usually the hardest thing to grasp for new coders. On Sun, Sep 20, 2009 at 8:02 AM, Mark Chandler wrote: > m_pTextPass is a pointer to a char not a char array and thus cant store the >

Re: [hlcoders] vgui::TextEntry problems

2009-09-20 Thread Jonas 'Sortie' Termansen
Of course your code crashes. Let me tell you what is happening in it. > char *m_pTextUser = ""; > char *m_pTextPass = ""; > Here you initialize two strings to the value "". This means that both strings already point to a string. This string is null-terminated, and because the s

Re: [hlcoders] vgui::TextEntry problems

2009-09-20 Thread Mark Chandler
m_pTextPass is a pointer to a char not a char array and thus cant store the result in it. Change it to: char m_pTextUser[255]; char m_pTextPass[255]; nLena = 255 steven belmans wrote: > Hi all. > For some reason this piece of code forces my mod crash! I don't have a clue > of what's going

[hlcoders] vgui::TextEntry problems

2009-09-20 Thread steven belmans
Hi all. For some reason this piece of code forces my mod crash! I don't have a clue of what's going rong. char *m_pTextUser = ""; char *m_pTextPass = ""; int nLena = m_pUser->GetTextLength() + 1; int nLenb = m_pPassword->GetTextLength() + 1; m_pUser->SetTe