Frictional Games Forum (read-only)
My second script doesnt work? - 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 - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: My second script doesnt work? (/thread-12462.html)



My second script doesnt work? - kartanonperuna - 01-08-2012

"Expected identifier 14,15"
This is what I get when I enter the level door to my second map.

Heres my second script fore my second map.


////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("crowbar_joint_2", "crowcollide", "crowopen_func", true, 1);
AddUseItemCallback("", "crowbar_1", "prison_locked", "activatecrowdoor", true);
AddUseItemCallback("", "key_tomb_rusty", "cellar_wood01_slow", "KeyOnDoor", true);
AddUseItemCallback("", "key_torture_chamber_1", "hatch_metal01_1", "KeyOnDoor2", true);
AddUseItemCallback("", "key_study_1", "cellar_wood01_1", "KeyOnDoor3", true);
PlayMusic("drums soundtrack.ogg", true, 1.0f, 1.0f, 1, false);
AddEntityCollideCallback("Player", "TriggerArea1", "TriggerMonster", true, 1);
}

TriggerMonster(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("enemy_suitor_1", true);
}

void KeyOnDoor3(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("cellar_wood01_1", false, true);
PlaySoundAtEntity("", "unlock_door", "cellar_wood01_1", 0, false);
RemoveItem("key_study_1");
}

////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}


RE: My second script doesnt work? - flamez3 - 01-08-2012

Please, try and figure out these things on your own. I beg you.

You don't have void before TriggerMonster


RE: My second script doesnt work? - kartanonperuna - 01-08-2012

Hah im trying and try to solve them with others in skype but they said they dont know why.


RE: My second script doesnt work? - flamez3 - 01-08-2012

"Expected identifier 14,15"
Means that on the 14th line, inside that function block; there is something wrong with it. Get notepad ++ and change the language to C++, you will be able to see what's wrong alot easier then in regular notepad.



RE: My second script doesnt work? - Your Computer - 01-09-2012

Post #2 says what the problem is.


RE: My second script doesnt work? - BlueFury - 01-09-2012

See Your Computer's signature, his tutorials: from Noob to Pro are great, please follow those.


RE: My second script doesnt work? - flamez3 - 01-09-2012

(01-09-2012, 01:44 AM)Your Computer Wrote: Post #2 says what the problem is.
Indeed


RE: My second script doesnt work? - kartanonperuna - 01-09-2012

Yeah forgot to put solve.