Talk:VGUI Task List

From Valve Developer Community
Jump to navigation Jump to search

We're interested in implimenting something similar to the task list you posted here, but are getting many errors in the compilation. We've created the files and copied and pasted into Visual Studio .NET 2003. Some of the errors we get are:

  • \src\dlls\entitylist.h(133): error C2572: 'CGlobalEntityList::FindEntityByName' : redefinition of default parameter : parameter 4
  • \src\dlls\entitylist.h(133): error C2535: 'C_BaseEntity *CGlobalEntityList::FindEntityByName(C_BaseEntity *,const char *,C_BaseEntity *,C_BaseEntity *)' : member function already defined or declared
  • \src\dlls\entitylist.h(133): error C2548: 'CGlobalEntityList::FindEntityByName' : missing default parameter for parameter 4
  • \src\dlls\entityoutput.h(76): error C2146: syntax error : missing ';' before identifier 'm_Value'
  • \src\dlls\entityoutput.h(76): error C2501: 'CBaseEntityOutput::variant_t' : missing storage-class or type specifiers

etc.

We were wondering if someone could let us know how exactly to add the new files into the project so that it may compile properly. Thanks for any help! Method3 17:29, 19 Apr 2006 (PDT)


I was able to get the code to compile in August 2010 (using Visual Studio 2005 and the 2006 Engine) by changing line 322 of hud_tasklist.cpp as follows:

//g_pVGuiLocalize->ConvertANSIToUnicode( szString, m_pText[task_index], sizeof(m_pText[task_index]) );

	vgui::localize()->ConvertANSIToUnicode( szString, m_pText[task_index], sizeof(m_pText[task_index]) );

Also, make sure that the files in the cl_dll directories are added to the client_hl2 Project in the Visual Studio Solution and the files in the dlls directory are added to the server_hl2 Project. (Click on each project before selecting the menu option Project->Add Existing Item...