Frictional Games Forum (read-only)

Full Version: [SCRIPT] Unexpected end of File?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I get that error message when I start up my map, I have double checked, nothing is wrong, and it say on the error message 86,2 so I'm assuming that means the 86th line of code is causing the problem. So here it is.

83 void React(string &in asEntity, int alState)
84 {
85 PlaySoundAtEntity("ReactScare1", "react_pant3.snt", "Player", 0, false);
86 }
the 86,2 doesn't help, post the whole script
Gotcha, sorry that's what I thought Tongue
////////////////////////////
// Run first time starting map
void OnStart()
{
SetEntityPlayerLookAtCallback("wall_default_5", "Scary", true);
AddEntityCollideCallback("Player", "SuperScary", "Scare1", true, 1);
AddEntityCollideCallback("Player", "MusicStart", "MusicStart", true, 1);
AddUseItemCallback("LabKey", "LabKey", "sewer_arched_2", "Unlock", true);
AddEntityCollideCallback("Player", "Scream", "Scream", true, 1);
AddEntityCollideCallback("Player", "Thump", "Thump, true, 1);
AddEntityCollideCallback("Player", "HauntingScream", "Scream1", true, 1);
SetEntityPlayerLookAtCallback("corpse_male_1", "React", true);
}

void Scary(string &in asEntity, int alState)
{
PlaySoundAtEntity("ReactScare", "react_scare.snt", "Player", 0, false);
GiveSanityDamage(1, true);
}

void Scare1(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("Monster", "notice_long.snt", "book_movable_1", 0, false);
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_10", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_11", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_12", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_13", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_14", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_15", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_16", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_17", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_18", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_19", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_20", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_21", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_22", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_23", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_24", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_25", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_26", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_27", 0, "");
}

void MusicStart(string &in asParent, string &in asChild, int alState)
{
PlayMusic("01_amb_darkness.ogg", true, 0.7, 3, 5, true);
}

void Unlock(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("sewer_arched_2", false, true);
PlaySoundAtEntity("", "unlock_door", "sewer_arched_2", 0, false);
RemoveItem("LabKey");
}

void Scream(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("Scream", "05_event_door_bang.ogg", "sofa_1", 0, false);
GiveSanityDamage(1, true);
}

void Thump(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("Thump", "15_bang_fall.snt", "sofa_1", 0, false);
}

void HauntingScream(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("HauntingScream", "21_scream6.snt", "corpse_male_1", 0, false);
SetEntityActive("corpse_male_1", true);
}

void React(string &in asEntity, int alState)
{
PlaySoundAtEntity("ReactScare1", "react_pant3.snt", "Player", 0, false);
}

I think I found it. Forgot a quote after thump.
AddEntityCollideCallback("Player", "Thump", "Thump, true, 1);

"
make it AddEntityCollideCallback("Player", "Thump", "Thump", true, 1);

The only way I would have seen this, is with this plugin

http://forum.frictionalgames.com/showthr...&pid=87521


Apjjm's plugin will show an obvious error when it comes to " marks.(The majority of the script after the missing quotation will turn brown)
(01-29-2012, 07:26 AM)Tripication Wrote: [ -> ]AddEntityCollideCallback("Player", "Thump", "Thump, true, 1);

"
make it AddEntityCollideCallback("Player", "Thump", "Thump", true, 1);

The only way I would have seen this, is with this plugin

http://forum.frictionalgames.com/showthr...&pid=87521


Apjjm's plugin will show an obvious error when it comes to " marks.(The majority of the script after the missing quotation will turn brown)
Thanks man, I need that plugin, I'm a stupid mistakes kinda guy, so thanks again.


No probs.