Frictional Games Forum (read-only)
[SCRIPT] [SOLVED]Script error.Help. - 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: [SCRIPT] [SOLVED]Script error.Help. (/thread-25163.html)



[SOLVED]Script error.Help. - SSEAlexander - 04-26-2014

i got error
"main (44,2) : ERR : Unexpected end of file"
i dont even know that that means...

void OnStart()
{
PlayMusic("music.ogg", true, 1, 5, 0, true);
SetSanityDrainDisabled(true);
AddEntityCollideCallback("Player","AMB1","amb1",true,1) ;
AddEntityCollideCallback("Player","b3","nope",true,1) ;
AddEntityCollideCallback("Player","AMB1_1","horrors",true,1) ;
RemoveItem("syr_2");
GiveItemFromFile("syr_3", "radioe.ent");
AddEntityCollideCallback("Player","getmatch","matchready",true,1) ;
}


void amb1(string &in asParent, string &in asChild, int alState)
{
PlayGuiSound("087bamb1.ogg", 1.4f);
}


void nope(string &in asParent, string &in asChild, int alState)
{
PlayGuiSound("no87b.ogg", 1.4f);
SetLightVisible("PointLight_1", false);
}


void horrors(string &in asParent, string &in asChild, int alState)
{
PlayGuiSound("horror17bscp.ogg", 1.4f);
}


void matchready(string &in asParent, string &in asChild, int alState) {
{
SetMessage("Journal", "matchisready", 6.0f);
SetEntityActive("matchuse",true) ;
}


void usethematch(string &in entity) {
{
SetLightVisible("matchl", true);
PlayGuiSound("match087b.ogg", 1.4f);
}


RE: Script error.Help. - PutraenusAlivius - 04-26-2014

I don't think this is your entire script. Can you post everything?


RE: Script error.Help. - Romulator - 04-26-2014

PHP Code:
void matchready(string &in asParentstring &in asChildint alState) {

SetMessage("Journal""matchisready"6.0f);
SetEntityActive("matchuse",true) ;
}


void usethematch(string &in entity) {

SetLightVisible("matchl"true);
PlayGuiSound("match087b.ogg"1.4f);


Remove the { at the end of the voids. Otherwise, you have more than one and no countering braces.


RE: Script error.Help. - SSEAlexander - 04-26-2014

(04-26-2014, 11:43 AM)Romulator Wrote:
PHP Code:
void matchready(string &in asParentstring &in asChildint alState) {

SetMessage("Journal""matchisready"6.0f);
SetEntityActive("matchuse",true) ;
}


void usethematch(string &in entity) {

SetLightVisible("matchl"true);
PlayGuiSound("match087b.ogg"1.4f);


Remove the { at the end of the voids. Otherwise, you have more than one and no countering braces.
thanks.I mostly got problems with that scripting Tongue