Frictional Games Forum (read-only)
Can anyone help me find the Script Error?? - 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: Can anyone help me find the Script Error?? (/thread-18344.html)



Can anyone help me find the Script Error?? - danimora2012 - 09-15-2012

////////////////////////////
//Run First Time Starting map
void OnStart()
{
AddEntityCollideCallback("Player", "Music_1", "start", true, 1)
}

void start(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "Scary.snt", "Player", 0, false);
}

AddUseItemCallback("", "key_Tomb_1", "Doortodeath_1", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("Doortodeath_1", false);
PlaySoundAtEntity("", "unlock_door", "Doortodeath_1", 0.0f, false);
RemoveItem("key_Tomb_1");
AddDebugMessage("Key On Door", false);
}

AddEntityCollideCallback("Player", "Music_1", "start", true, 1)
}


void start(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "Scary.snt", "Player", 0, false);
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}

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

}


Im tired of looking and if i mess with it it get's worse...Please...Help me... Sad


RE: Can anyone help me find the Script Error?? - EXAWOLT - 09-15-2012

AddEntityCollideCallback u missed a ";" at the end of some of these

another tip:
When you start the custom-story in amnesia an error report will show up.

It will say something like:
FATAL ERROR
136,6 missing "," and ";"
//or something like that, "136" means that the error is in the 136.th row in your textfile, and ",6" is the letter room 6 (this is just an example)
and "," means that u have missed that letter in that place.

start the map an read where the problem is next time.


RE: Can anyone help me find the Script Error?? - Kazakarumariou - 09-15-2012

////////////////////////////
//Run First Time Starting map
void OnStart()
{
AddEntityCollideCallback("Player", "Music_1", "start", true, 1);
AddUseItemCallback("", "key_Tomb_1", "Doortodeath_1", "UsedKeyOnDoor", true);
}

void start(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "Scary.snt", "Player", 0, false);
}


void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("Doortodeath_1", false);
PlaySoundAtEntity("", "unlock_door", "Doortodeath_1", 0.0f, false);
RemoveItem("key_Tomb_1");
AddDebugMessage("Key On Door", false);
}


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

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

}