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
Fatal Error
vansd Offline
Junior Member

Posts: 8
Threads: 4
Joined: Apr 2011
Reputation: 0
#1
Fatal Error

Look at my code
void OnStart()
{
// use "ScriptArea_1" on "servunt_grunt_1" enemy => calls "MonsterFunc1"
AddUseItemCallback("", "key_tomb_2", "prison_2", "KeyOnDoor", true);

// use "key_tomb_3" on "castle_4" door => calls "KeyOnDoor"
AddUseItemCallback("", "key_tomb_3", "castle_4", "KeyOnDoor", true);
}
void MonsterFunc1(string &in asParent, string &in asChild , int alState)
{
SetEntityActive("servant_grunt_1" , true);

void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("castle_4", false, true);
RemoveItem(asItem);
PlaySoundAtEntity("", "unlock_door.snt", "castle_4", 0.0f, true);
}
I have fatal error. Unexpected end of the file. I can't understand what i did wrong. Help!
04-17-2011, 03:59 PM
Find
MrBigzy Offline
Senior Member

Posts: 616
Threads: 18
Joined: Mar 2011
Reputation: 8
#2
RE: Fatal Error

Put a } after SetEntityActive("servant_grunt_1" , true);
04-17-2011, 04:23 PM
Find
vansd Offline
Junior Member

Posts: 8
Threads: 4
Joined: Apr 2011
Reputation: 0
#3
RE: Fatal Error

And I have another question
My scrip with monster worked, but now it isn't working. Why?
04-17-2011, 04:31 PM
Find
Linus Ågren Offline
Senior Member

Posts: 309
Threads: 58
Joined: Jan 2011
Reputation: 5
#4
RE: Fatal Error

void MonsterFunc1(string &in asParent, string &in asChild , int alState)
{
SetEntityActive("servant_grunt_1" , true);
}

You forgot closing bracket Smile

Creator of The Dark Treasure.
(This post was last modified: 04-17-2011, 08:04 PM by Linus Ågren.)
04-17-2011, 08:01 PM
Website Find




Users browsing this thread: 1 Guest(s)