Frictional Games Forum (read-only)

Full Version: Custom story crashes at this map: 03_hall.map
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

goalreadymc

im testing my custom story and when i get to the map its crashes. i think ive done my scripting wrong. can anyone examine it?

Code:
void OnStart()
{

PlayMusic("09_amb_safe.ogg", true, 3, 3, 1, true);

}

{

AddUseItemCallback("", "cellar_key", "cellar_door", "UsedKeyOnDoor", true);

}


void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked("cellar_door", false, true);
    PlaySoundAtEntity("", "unlock_door", "cellar_door, 0, false);
    RemoveItem("cellar_key");
}
[/align]
PHP Code:
void OnStart()
{
PlayMusic("09_amb_safe.ogg"true331true);
AddUseItemCallback("""cellar_key""cellar_door""UsedKeyOnDoor"true);
}

void UsedKeyOnDoor(string &in asItemstring &in asEntity)
{
    
SetSwingDoorLocked("cellar_door"falsetrue);
    
PlaySoundAtEntity("""unlock_door""cellar_door"0false); //Mudbill told me to fix this :D
    
RemoveItem("cellar_key");


That should fix it...

EDIT: Thanks Mudbill, fixed that :3
^Missing closing quote on cellar_door down there. Just add it before the comma.

goalreadymc

K, it works now. thx!