Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to fix the error
ZodiaC Offline
Member

Posts: 120
Threads: 8
Joined: Oct 2012
Reputation: 2
#5
RE: How to fix the error

(10-23-2012, 01:16 PM)Josh9810 Wrote: I am really new to scripting and just want a monster to walk out a door go away then disappear so I can get a key to get out.

My script is here and it says FATAL ERROR: could not load script file
(map stuff)
main (32,2) : ERR : Unexpected end of file

I need help on how to fix these problems I dont have much experience with scripting at all.
-------------------------------------------------------------------------------------------------
void OnStart()
{
AddEntityCollideCallback("Player", "brutey", "MonsterFunction", true, 1);
}
void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Brute", true);
AddEnemyPatrolNode("Brute", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("Brute", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("Brute", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("Brute", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("Brute", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("Brute", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("Brute", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("Brute", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("Brute", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("Brute", "PathNodeArea_10", 0, "");
AddEnemyPatrolNode("Brute", "PathNodeArea_11", 0, "");
AddEnemyPatrolNode("Brute", "PathNodeArea_12", 0, "");
AddUseItemCallback("", "key", "unlock", "unlockdoor", true);

void unlockdoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("unlock", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "unlock", 0, false);
RemoveItem("key");
AddEntityCollideCallback("Brute", "brute_go", "Monsterdisappear", true, 1);
}
void Monsterdisappear(string &in asParent, string &in asChild, int alState)
{
SetEnemyDisabled("Brute", true);
}
-----------------------------------------------------------------------------------------
sorry if ultimate noob but Im 13.
I don't see any Logic error here..But you have a Syntax Error.If you are using notepad++ go to line:21,Col:1 (Between AddUseItemCallback("", "key", "unlock", "unlockdoor", true); and void unlockdoor(string &in asItem, string &in asEntity) ) there you forgot to put a } !
I hope this is the only error.

[Image: 2H1Mc.jpg]
10-23-2012, 05:43 PM
Find


Messages In This Thread
How to fix the error - by Josh9810 - 10-23-2012, 01:16 PM
RE: How to fix the error - by FlawlessHappiness - 10-23-2012, 01:27 PM
RE: How to fix the error - by GrAVit - 10-23-2012, 04:12 PM
RE: How to fix the error - by FlawlessHappiness - 10-23-2012, 04:35 PM
RE: How to fix the error - by ZodiaC - 10-23-2012, 05:43 PM
RE: How to fix the error - by FlawlessHappiness - 10-23-2012, 06:34 PM
RE: How to fix the error - by Josh9810 - 10-24-2012, 04:13 AM
RE: How to fix the error - by The chaser - 10-24-2012, 06:36 AM
RE: How to fix the error - by Josh9810 - 10-24-2012, 07:31 AM
RE: How to fix the error - by The chaser - 10-24-2012, 09:13 AM
RE: How to fix the error - by Josh9810 - 10-24-2012, 09:22 AM
RE: How to fix the error - by The chaser - 10-24-2012, 09:41 AM
RE: How to fix the error - by ZodiaC - 10-24-2012, 11:28 AM
RE: How to fix the error - by Josh9810 - 10-25-2012, 05:35 AM
RE: How to fix the error - by Ongka - 10-25-2012, 06:59 AM
RE: How to fix the error - by ZodiaC - 10-23-2012, 06:54 PM
RE: How to fix the error - by Robby - 10-23-2012, 06:56 PM
RE: How to fix the error - by FlawlessHappiness - 10-24-2012, 07:02 AM
RE: How to fix the error - by FlawlessHappiness - 10-24-2012, 09:50 AM
RE: How to fix the error - by Ongka - 10-24-2012, 01:11 PM
RE: How to fix the error - by ZodiaC - 10-24-2012, 02:05 PM
RE: How to fix the error - by Ongka - 10-24-2012, 04:39 PM
RE: How to fix the error - by FlawlessHappiness - 10-25-2012, 06:59 AM
RE: How to fix the error - by Josh9810 - 10-25-2012, 07:53 AM
RE: How to fix the error - by Ongka - 10-25-2012, 08:19 AM
RE: How to fix the error - by Josh9810 - 10-26-2012, 05:51 AM
RE: How to fix the error - by Josh9810 - 10-26-2012, 07:41 AM



Users browsing this thread: 1 Guest(s)