Frictional Games Forum (read-only)

Full Version: Unexpected End To File
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
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);
(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)
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