Frictional Games Forum (read-only)
Custom Story Error? pls Heeelp - 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)
+---- Forum: Technical Support (https://www.frictionalgames.com/forum/forum-37.html)
+---- Thread: Custom Story Error? pls Heeelp (/thread-24166.html)



Custom Story Error? pls Heeelp - Radical Batz - 12-20-2013

so this is the script for my amnesia custom story!

void OnStart()
{
setEntityPlayerInteractCallback("key_tomb_rusty_1", "ActivateMonster"), true);
}

void OnEnter()
{

}

void OnLeave()
{

}

void ActivateMonster(string &in item)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "Idle");
}



Is there something I did wrong because I keep getting an error whenever I load my custom story! saying "FATAL ERROR: Could not load script file
'custom_stories/ThereHasToBeaWayout/maps/ch01/ThereHasToBeaWayOut.hps'!
main (4,77):ERR :Expected ';'


RE: Custom Story Error? pls Heeelp - RaideX - 12-20-2013

(12-20-2013, 02:50 PM)Badcat5550 Wrote: so this is the script for my amnesia custom story!

void OnStart()
{
setEntityPlayerInteractCallback("key_tomb_rusty_1", "ActivateMonster"), true);
}

void OnEnter()
{

}

void OnLeave()
{

}

void ActivateMonster(string &in item)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "Idle");
}



Is there something I did wrong because I keep getting an error whenever I load my custom story! saying "FATAL ERROR: Could not load script file
'custom_stories/ThereHasToBeaWayout/maps/ch01/ThereHasToBeaWayOut.hps'!
main (4,77):ERR :Expected ';'

You have a missplaced bracked on line 4 Smile

try replacing the line with this:

PHP Code:
SetEntityPlayerInteractCallback("key_tomb_rusty_1""ActivateMonster"true); 



RE: Custom Story Error? pls Heeelp - Romulator - 12-20-2013

Firstly: Welcome to the forums!

Secondly, you have posted this in the wrong section. Please use the Development Support section next time you are having errors related to Custom Story installation or development errors.

What is wrong is your SetEntityPlayerInteractCallback syntax. It should be written as:
PHP Code:
SetEntityPlayerInteractCallback("key_tomb_rusty_1""ActivateMonster"true); 

What your issue is; is that you have a bracket that shouldn't be there. Otherwise, I believe it to be correct.

Edit: Was ninja'd by RaideX. Stupid iPod.


RE: Custom Story Error? pls Heeelp - Radical Batz - 10-05-2014

Ahhh memories, I remember when I didn't know how to code, not even anything XD
I used to tell people to give me a code every single time but now because of the help of neelke, lazzer and the forums now I know how to script all by myself. Thank u neelke, lazzer and the forums, my work would be nothing without u Heart


RE: Custom Story Error? pls Heeelp - Kreekakon - 10-05-2014

That's great and all Badcat, but there's no need to go digging up old threads over it Smile

-Locked