Frictional Games Forum (read-only)

Full Version: what does this mean?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
FATAL ERROR: Ccould not load script file 'custom_stories/Mark's
story/csmaps/CTonguerogram Files (x86)/Amnesia- The Dark
Descent/redist/custom_stories/Mark's story/csmaps/map_3.hps'!
main (1,2) : ERR : Expected identifier I am trying to get the level door for map_2 to get to map_3 and it keeps saying this
Give me the script in the map_3.hps
(03-16-2013, 06:54 AM)JustAnotherPlayer Wrote: [ -> ]Give me the script in the map_3.hps

I actually figured it out haha it was because I enabled scripting for my map, and never did the OnStart OnEnter OnLeave so it wouldn't load. By now I'm trying to get A swing door to be locked and It's not working.
You need to give us your script so that we can see why it's not working.
(03-16-2013, 05:21 PM)NaxEla Wrote: [ -> ]You need to give us your script so that we can see why it's not working.

void OnStart()
{
AddUseItemCallback("", "Key_3", "castle_1", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
void SetSwingDoorLocked("",);
PlaySoundAtEntity("", "unlock_door", "castle_1", 0, false);
RemoveItem("Key_3");
}

void OnEnter()
{

}

void OnLeave()
{

}
I'm not sure what to put after SetSwingDoorLocked I don't really understand what it's saying on the guide
It needs to be like this:
PHP Code:
void OnStart()
{
    
AddUseItemCallback("""Key_3""castle_1""UsedKeyOnDoor"true);
}

void UsedKeyOnDoor(string &in asItemstring &in asEntity)
{
    
SetSwingDoorLocked("castle_1"false);
    
PlaySoundAtEntity("""unlock_door""castle_1"0false);
    
RemoveItem("Key_3");
}

void OnEnter()
{

}

void OnLeave()
{


(03-16-2013, 07:37 PM)NaxEla Wrote: [ -> ]It needs to be like this:
PHP Code:
void OnStart()
{
    
AddUseItemCallback("""Key_3""castle_1""UsedKeyOnDoor"true);
}

void UsedKeyOnDoor(string &in asItemstring &in asEntity)
{
    
SetSwingDoorLocked("castle_1"false);
    
PlaySoundAtEntity("""unlock_door""castle_1"0false);
    
RemoveItem("Key_3");
}

void OnEnter()
{

}

void OnLeave()
{



It's saying this: FATAL ERROR: Could not load script file 'custom_stories/Mark's
story/csmaps/C:/Program Files (x86)/Amnesia- The Dark
Descent/redist/custom_stories/Mark's story/csmaps/map_3.hps'!
main (8,2) : ERR : No matching signatures to
'SetSwingDoorLocked(string@&, const bool)'
and this is my entire script for this map now:
void OnStart()
{
AddUseItemCallback("", "Key_3", "castle_1", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("castle_1", false);
PlaySoundAtEntity("", "unlock_door", "castle_1", 0, false);
RemoveItem("Key_3");
}

void OnEnter()
{

}

void OnLeave()
{

}
the swing door is checked off as locked in the level editor, if that has anything to do with it
Sorry, I made a mistake. You should change this line:
Code:
SetSwingDoorLocked("castle_1", false);
to this:
Code:
SetSwingDoorLocked("castle_1", false, false);
(03-16-2013, 08:28 PM)NaxEla Wrote: [ -> ]Sorry, I made a mistake. You should change this line:
Code:
SetSwingDoorLocked("castle_1", false);
to this:
Code:
SetSwingDoorLocked("castle_1", false, false);

Isn't it supposed to be
SetSwingDoorLocked("castle_1", false, true);
?
Because false means whether the door should be locked/unlocked and the true means whether the effects were used or not.