Frictional Games Forum (read-only)
Unexpected End To File - 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)
+--- Thread: Unexpected End To File (/thread-8123.html)



Unexpected End To File - Scary22 - 05-19-2011

It keeps popping out. its pissing me off ):
////////////////////////////
// Run when starting map
void OnStart()
{
AddUseItemCallBack("", "spawnwaterkey_1", "spawnwaterdoor_1", "KeyOnWaterDoor", true);
AddEntityCollideCallback("Player" , "ScriptArea_1" , "MonsterFunc1 true , 1);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("spawnwaterdoor_1", false, true);
PlaySoundAtEntity("", "unlock_door", "spawnwaterdoor_1", 0, false);
RemoveItem("spawnwaterkey_1");
}
void MonsterFunc1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("wtfmeow", true);
}

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

}

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

}
check whats wrong please


RE: Unexpected End To File - Tanshaydar - 05-19-2011

When an script error pop-up shows up, please give us the numbers so we can look into the line number which is wrongly scripted.
You should change
AddEntityCollideCallback("Player" , "ScriptArea_1" , "MonsterFunc1 true , 1);
to
AddEntityCollideCallback("Player" , "ScriptArea_1" , "MonsterFunc1", true , 1);


RE: Unexpected End To File - Scary22 - 05-20-2011

(05-19-2011, 01:50 PM)Tanshaydar Wrote: When an script error pop-up shows up, please give us the numbers so we can look into the line number which is wrongly scripted.
You should change
AddEntityCollideCallback("Player" , "ScriptArea_1" , "MonsterFunc1 true , 1);
to
AddEntityCollideCallback("Player" , "ScriptArea_1" , "MonsterFunc1", true , 1);

it says 32,1 or 33,1 Unexpected End Of Line.
Or Sometimes Did not found matching entity at (string &in blah blah blah)


RE: Unexpected End To File - Kyle - 05-20-2011

Wow. I found the error literally in less than 15 seconds. :p

But you know, people who aren't used to scripting usually can't find errors as good. Smile