Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom story help!
mrlego611 Offline
Junior Member

Posts: 13
Threads: 3
Joined: Nov 2012
Reputation: 0
#1
Sad  Custom story help!

So I was creating a custom map for Amnesia called The Cellar. I wanted to make a teleporting naked guy to appear in the game so I found the tutorial and did the scripting. But when I tested the level and tried to enter the main cellar level, the game just crashed with this message:


FATAL ERROR: Could not load script file 'custom_stories/TheCellar/maps//Applications/Amnesia.app/Contents/Resources/custom_stories/TheCellar/maps/01_cellar.hps'!
ExecuteString (1, 1) : ERR : No matching signatures to 'OnLeave()'
main (14, 1) : ERR : Unexpected token '{'

I am on a Mac so I need some help with this. If you need the script, here it is.


void OnStart()
{
AddUseItemCallback("", "valvekey", "valvedoor", "UsedKeyOnDoor", true);
}

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

{
AddEntityCollideCallback("Player", "Tp_Script1", "tp_male1", true, 1);
}
void tp_male1 (string &in asParent, string &in asChild, int alState)

{
SetEntityActive("tp_male1", true)
AddPropForce("tp_male1", 0, 0, -10000,"World");
}

Tell me if there are any scripts that conflict with other scripts. Thanks!
(This post was last modified: 11-01-2012, 07:59 PM by Statyk.)
11-01-2012, 06:28 PM
Find
ZodiaC Offline
Member

Posts: 120
Threads: 8
Joined: Oct 2012
Reputation: 2
#2
RE: Custom story help!

(11-01-2012, 06:28 PM)mrlego611 Wrote: So I was creating a custom map for Amnesia called The Cellar. I wanted to make a teleporting naked guy to appear in the game so I found the tutorial and did the scripting. But when I tested the level and tried to enter the main cellar level, the game just crashed with this message:


FATAL ERROR: Could not load script file 'custom_stories/TheCellar/maps//Applications/Amnesia.app/Contents/Resources/custom_stories/TheCellar/maps/01_cellar.hps'!
ExecuteString (1, 1) : ERR : No matching signatures to 'OnLeave()'
main (14, 1) : ERR : Unexpected token '{'

I am on a Mac so I need some help with this. If you need the script, here it is.


void OnStart()
{
AddUseItemCallback("", "valvekey", "valvedoor", "UsedKeyOnDoor", true);
}

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

{
AddEntityCollideCallback("Player", "Tp_Script1", "tp_male1", true, 1);
}
void tp_male1 (string &in asParent, string &in asChild, int alState)

{
SetEntityActive("tp_male1", true)
AddPropForce("tp_male1", 0, 0, -10000,"World");
}

Tell me if there are any scripts that conflict with other scripts. Thanks!
Try this and if you want I will explain you you syntax errors!

void OnStart()
{
AddUseItemCallback("", "valvekey", "valvedoor", "UsedKeyOnDoor", true);
AddEntityCollideCallback("Player", "Tp_Script1", "tp_male1", true, 1);
}

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

void tp_male1 (string &in asParent, string &in asChild, int alState)
{
SetEntityActive("tp_male1", true);
AddPropForce("tp_male1", 0, 0, -10000,"World");
}

[Image: 2H1Mc.jpg]
11-01-2012, 06:36 PM
Find
mrlego611 Offline
Junior Member

Posts: 13
Threads: 3
Joined: Nov 2012
Reputation: 0
#3
RE: Custom story help!

(11-01-2012, 06:36 PM)ZodiaC Wrote:
(11-01-2012, 06:28 PM)mrlego611 Wrote: So I was creating a custom map for Amnesia called The Cellar. I wanted to make a teleporting naked guy to appear in the game so I found the tutorial and did the scripting. But when I tested the level and tried to enter the main cellar level, the game just crashed with this message:


FATAL ERROR: Could not load script file 'custom_stories/TheCellar/maps//Applications/Amnesia.app/Contents/Resources/custom_stories/TheCellar/maps/01_cellar.hps'!
ExecuteString (1, 1) : ERR : No matching signatures to 'OnLeave()'
main (14, 1) : ERR : Unexpected token '{'

I am on a Mac so I need some help with this. If you need the script, here it is.


void OnStart()
{
AddUseItemCallback("", "valvekey", "valvedoor", "UsedKeyOnDoor", true);
}

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

{
AddEntityCollideCallback("Player", "Tp_Script1", "tp_male1", true, 1);
}
void tp_male1 (string &in asParent, string &in asChild, int alState)

{
SetEntityActive("tp_male1", true)
AddPropForce("tp_male1", 0, 0, -10000,"World");
}

Tell me if there are any scripts that conflict with other scripts. Thanks!
Try this and if you want I will explain you you syntax errors!

void OnStart()
{
AddUseItemCallback("", "valvekey", "valvedoor", "UsedKeyOnDoor", true);
AddEntityCollideCallback("Player", "Tp_Script1", "tp_male1", true, 1);
}

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

void tp_male1 (string &in asParent, string &in asChild, int alState)
{
SetEntityActive("tp_male1", true);
AddPropForce("tp_male1", 0, 0, -10000,"World");
}
Thanks so much! Worked like a charm! Smile
11-01-2012, 07:00 PM
Find
ZodiaC Offline
Member

Posts: 120
Threads: 8
Joined: Oct 2012
Reputation: 2
#4
RE: Custom story help!

(11-01-2012, 07:00 PM)mrlego611 Wrote: Thanks so much! Worked like a charm! Smile
Your welcome! Wink

[Image: 2H1Mc.jpg]
11-01-2012, 08:07 PM
Find




Users browsing this thread: 1 Guest(s)