function not found
Posted: 19 Oct 2014, 11:19
Hey guys,
Error: "Function PickUpObject not found".
Why does the compiler not find my function?
edit: full script
Code: Select all
Void ProcessEvents ()
{
foreach (Event in PendingEvents)
{
if (Event.Type == CSmModeEvent::EType::OnPlayerTouchesObject)
{
if ((Event.Player != Null) && (Event.Player.SpawnStatus == CSmPlayer::ESpawnStatus::Spawned) && (Event.Landmark != Null))
{
PickUpObject (Event.Player, Event.Object, Event.Landmark);
PassOn (Event);
}
else
Discard (Event);
}
else
PassOn(Event);
}
}
Void PickUpObject (CSmPlayer Player, CSmObject Object, CSmMapLandmark Landmark)
{
if ((Landmark.Tag == "Armor") && (Player.Armor < Player.ArmorMax))
AddPlayerArmor (Player, 100, Player, 1);
Object.SetPlayer (Player);
//ObjectDestroy (Object);
}
Why does the compiler not find my function?
edit: full script