What is wrong on this code (beta 5):
void VeteranSystem::OnObjectCreate(void *data,GameObject *obj)
{
if (Commands->Is_A_Star(obj) && obj->As_SoldierGameObj() )
{
Attach_Script_Once(obj, "Veteran_Player", "");
Update_Player(Get_Player_ID(obj), obj);
}
else if ( obj->As_VehicleGameObj() )
{
Attach_Script_Once(obj, "Veteran_Vehicle", "");
}
else if (!obj)
{
Attach_Script_Once(obj, "Veteran_C4", "");
}
else if (obj->As_BeaconGameObj() )
{
Attach_Script_Once(obj, "Veteran_Beacon", "");
}
else if (obj->As_BuildingGameObj() )
{
Attach_Script_Once(obj, "Veteran_Building", "");
}
}
I get this error:
21> Veteran.cpp
21>Veteran.cpp(609): error C2039: 'As_BeaconGameObj' : is not a member of 'ScriptableGameObj'
21> c:\ssgm4 beta 5\scripts\ScriptableGameObj.h(50) : see declaration of 'ScriptableGameObj'
21>
21>Build FAILED.
Thanks for help.