Holger
Junior Member
Posts: 3
Threads: 1
Joined: Nov 2011
Reputation:
0
|
Basic problem with script editor
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);
}
(This post was last modified: 11-09-2011, 04:06 PM by Holger.)
|
|
11-09-2011, 03:44 PM |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
RE: Basic problem with script editor
ScriptTest -> SetEntityActive, you have a dangling quotation mark.
|
|
11-09-2011, 03:54 PM |
|
Holger
Junior Member
Posts: 3
Threads: 1
Joined: Nov 2011
Reputation:
0
|
RE: Basic problem with script editor
What is that supposed to mean?
|
|
11-09-2011, 03:58 PM |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
RE: Basic problem with script editor
In other words, in your ScriptTest function where you tried to call SetEntityActive, you have a quotation mark ( " ) that isn't supposed to be there.
|
|
11-09-2011, 04:03 PM |
|
Holger
Junior Member
Posts: 3
Threads: 1
Joined: Nov 2011
Reputation:
0
|
RE: Basic problem with script editor
Ohh.............. I must be tired. Every time I read your post I read "question mark".. Thanks alot! I've been extremely blind
|
|
11-09-2011, 04:04 PM |
|
|