Hi. I'm new to the scripting/modding thing. I've been playing around for some time on my map, but now it wont load because of an error.
I've had this error many times and got it fixed by doing random things, but this time I can't get it away
It's unexpected end of file 59,2
And everytime a remove an entire void paragraph, it just says unexpected end of file at 48,2 maybe etc (it always references to the last } in the file.
So what am I doing wrong? Notepad++ counts both 6 {'s and }'s so I don't lack any. I skimmed through entire sript with a friend and we couldn't see what's wrong.. Somebody help please, because I'm stuck^^.
void OnStart ()
{
AddEntityCollideCallback("Player", "ScriptAreaTest_1", "ScriptTest", true, 1);
AddEntityCollideCallback("Player", "RoomTwoArea", "CollideRoomTwo", true, 1);
AddEntityCollideCallback("servant_room_1", "MonsterPoofArea", "MonsterPoofArea", true, 1);
AddEntityCollideCallback("servant_door_2", "MonsterPoofArea", "MonsterPoofArea", true, 1);
AddEntityCollideCallback("servant_brute_1", "MonsterPoofArea", "MonsterPoofArea", true, 1);
AddUseItemCallback("", "Door_Key_1", "mansion_1", "OpenDoor", true);
SetEntityPlayerInteractCallback("door_explo_1", "DoorExplode", true);
/////////
// Enemy_Patrol
AddEnemyPatrolNode("servant_hall_1", "PathNodeArea_1", 0.0f, "");
AddEnemyPatrolNode("servant_hall_1", "PathNodeArea_3", 0.0f, "");
AddEnemyPatrolNode("servant_room_1", "PathNodeArea_11", 1, "");
AddEnemyPatrolNode("servant_room_1", "PathNodeArea_19", 5, "");
}
void ScriptTest(string &in asParent, string &in asChild, int alState)
{
SetMoveObjectState("cabinet_nice_1", 0);
SetEntityActive("chest_of_drawers_nice_1", false");
}
void OpenDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("Door_Key_1");
}
void CollideRoomTwo(string &in asParent, string &in asChild, int alState)
{
// SetEntityActive("servant_room_1", true);
// SetEnemyIsHallucination("servant_room_1", true);
SetSwingDoorClosed("mansion_1", true, false);
// ShowEnemyPlayerPosition("servant_hall_1");
}
void MonsterPoofArea(string &in asParent, string &in asChild, int alState)
{
SetEnemyIsHallucination("servant_room_1", true);
SetEnemyIsHallucination("servant_brute_1", true);
SetEnemyIsHallucination("servant_door_2", true);
}
void DoorExplode(string &in asEntity)
{
SetEntityActive("servant_door_2", true);
SetEntityActive("servant_brute_1", true);
SetPropHealth("door_explo_1", 0);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
SetSwingDoorLocked("mansion_1", true, true);
}