Frictional Games Forum (read-only)

Full Version: Checkpoints in script not working in any maps
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Whenever I put checkpoints into a script in any of my maps, the map crashes and it shows an error message stating: ERR: "No matching signatures to 'Checkpoint(string@&, string@&, string @&, string@&, string @&'." I posted below a script that I put a checkpoint in. What am I doing wrong?

Code:
void OnStart()
{       
       AddUseItemCallback("", "bone_saw_2", "wooden_boards_block_1", "SawGruntAlert", false);
    AddEntityCollideCallback("guest_grunt", "AreaDisableGuestGrunt", "DisableGuestGrunt", false, 1);
    AddEntityCollideCallback("Player", "AreaCheckpointGuestRooms", "CheckpointGuestRooms", true, 1);
}
void SawGruntAlert(string &in asItem, string &in asEntity)
{
    StartPlayerLookAt("wooden_boards_block_1", 0.3f, 0.3f, "");
    PlaySoundAtEntity("SawSound", "23_saw.snt", "wooden_boards_block_1", 0.0f, false);
    AddTimer("SawAfter", 4.0f, "SawAfterevent");
}
void SawAfterevent(string &in asTimer)
{
    SetPlayerSanity(100);
    SetEntityActive("wooden_boards_block_1", false);
    SetEntityActive("wooden_boards_block_broken_1", true);
    StopSound("SawSound", 0);
    AddTimer("TimerAlertGrunt", 1.0f, "AlertGuestGrunt");
    StopPlayerLookAt();
}
void AlertGuestGrunt(string &in asTimer)
{
    SetEntityActive("guest_grunt", true);
    AddEnemyPatrolNode("guest_grunt", "PathNodeArea_1", 0.0f, "");
    AddEnemyPatrolNode("guest_grunt", "PathNodeArea_2", 0.0f, "");
    AddEnemyPatrolNode("guest_grunt", "PathNodeArea_3", 0.0f, "");
    AddEnemyPatrolNode("guest_grunt", "PathNodeArea_4", 4.0f, "");
    AddEnemyPatrolNode("guest_grunt", "PathNodeArea_5", 0.0f, "");
    AddEnemyPatrolNode("guest_grunt", "PathNodeArea_6", 0.0f, "");
    AddEnemyPatrolNode("guest_grunt", "PathNodeArea_7", 4.0f, "");
    AddEnemyPatrolNode("guest_grunt", "PathNodeArea_8", 0.0f, "");
    AddEnemyPatrolNode("guest_grunt", "PathNodeArea_9", 0.0f, "");
    AddEnemyPatrolNode("guest_grunt", "PathNodeArea_10", 0.0f, "");
    AddEnemyPatrolNode("guest_grunt", "PathNodeArea_11", 0.0f, "");
}
void DisableGuestGrunt(string &in asParent, string &in asChild, int alState)
{
    SetEntityActive("guest_grunt", false);
}
void CheckpointGuestRooms(string &in asParent, string &in asChild, int alState)
{
    Checkpoint("GuestRoomsCheckpoint", "PlayerStartArea_3", "", "", "");
}
void OnEnter()
{
    PlayMusic("amb_guardian.ogg", true, 1.0f, 0, 0, true);
}






Try creating a dummy callback, dummy category and entry in you lang file, and linking them to you CheckPoint function. It could be that the Checkpoint function needs a callback and death hint to work.
still not working, it's doing the same thing.
do you find ANYTHING wrong with my script?
Checkpoint should be CheckPoint, capital P.
(06-08-2011, 02:14 AM)MrBigzy Wrote: [ -> ]Checkpoint should be CheckPoint, capital P.

owned lol