Frictional Games Forum (read-only)
Checkpoints in script not working in any maps - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Checkpoints in script not working in any maps (/thread-8491.html)



Checkpoints in script not working in any maps - willochill - 06-07-2011

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);
}









RE: Checkpoints in script not working in any maps - palistov - 06-07-2011

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.


RE: Checkpoints in script not working in any maps - willochill - 06-08-2011

still not working, it's doing the same thing.
do you find ANYTHING wrong with my script?


RE: Checkpoints in script not working in any maps - MrBigzy - 06-08-2011

Checkpoint should be CheckPoint, capital P.


RE: Checkpoints in script not working in any maps - SLAMnesia - 06-08-2011

(06-08-2011, 02:14 AM)MrBigzy Wrote: Checkpoint should be CheckPoint, capital P.

owned lol