Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » get_part_name, chathooks and strings
Re: get_part_name, chathooks and strings [message #367617 is a reply to message #366915] Sat, 17 January 2009 04:01 Go to previous messageGo to previous message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma:
General (3 Stars)
cAmpa wrote on Sun, 11 January 2009 10:04

In "GameObject *Get_Part_Name(const char *name1)" is a small bug,
replace

if (!stristr(name,name1))


with

if (stristr(name,name1))




This bug also exists in the "Get_Part_Names" function too. It needs to be changed to:

int Get_Part_Names(const char *name1)
{
	GenericSLNode *x = BaseGameObjList->HeadNode;
	int count = 0;
	while (x)
	{
		GameObject *o = As_SoldierGameObj((GameObject *)x->NodeData);
		if (o /*&& Commands->Is_A_Star(o)*/)
		{
			const char *name = Get_Player_Name(o);
			if (stristr(name,name1))
			{
				count++;
			}
			delete[] name;
		}
		x = x->NodeNext;
	}
	return count;
}


Just an FYI if anyone ever wondered why it doesn't work how they might expect it to.



 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Renegade SSMods Archive
Next Topic: Camera.ini
Goto Forum:
  


Current Time: Sat Dec 21 08:00:38 MST 2024

Total time taken to generate the page: 0.00706 seconds