Get_Part_Name was also fixed by reborn, I forgot to paste that too.
GameObject *Get_Part_Name(const char *name1)
{
GenericSLNode *x = BaseGameObjList->HeadNode;
int count = 0;
GameObject *current = 0;
while (x)
{
GameObject *o = As_ScriptableGameObj((GameObject *)x->NodeData);
if (o && Commands->Is_A_Star(o) && As_SoldierGameObj(o)){
const char *name = Get_Player_Name(o);
if (stristr(name,name1))
{
current = o;
count++;
}
delete[] name;
}
x = x->NodeNext;
}
if ((count == 1) && (current) && (Commands->Get_ID(current)))
{
return current;
}
else
{
return 0;
}
}
It should work now with this.
[Updated on: Sun, 14 November 2010 01:38]
Report message to a moderator