Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 2 Votes - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Whats wrong with my script?
Author Message
ZyLogicX Offline
Member

Posts: 189
Joined: May 2011
Reputation: 5
Post: #1
Whats wrong with my script?
It says unexpected end of file?

void OnEnter()
{
AddEntityCollideCallback("Player", "Intro_Quest_Area", "GetIntroQuest", true, 1);
AddEntityCollideCallback("Player", "Intro_Complete_Area", "FinishIntroQuest", true, 1);
}

void GetIntroQuest(string &in asParent, string &in asChild, int alState)
{
AddQuest("introquest", "IntroQuest");
}

void FinishIntroQuest(string &in asParent, string &in asChild, int alState)
{
CompleteQuest("introquest", "IntroQuest");

Void OnStart()
{
AddUseItemCallback("", "roomkey_1", "door_to_outside", "UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door_to_outside" , false , true);
PlaySoundAtEntity("" , "unlock_door" , "door_to_outside" , 0, false);
RemoveItem("roomkey_1");
}

The Elder Sign: The Asylum [45%]
This forum is dying.
07-27-2011 06:31 PM
Find all posts by this user Quote this message in a reply
Kyle Offline
Posting Freak

Posts: 910
Joined: Sep 2010
Reputation: 7
Post: #2
RE: Whats wrong with my script?
void FinishIntroQuest(string &in asParent, string &in asChild, int alState)
{
CompleteQuest("introquest", "IntroQuest");
}

07-27-2011 06:35 PM
Find all posts by this user Quote this message in a reply
ZyLogicX Offline
Member

Posts: 189
Joined: May 2011
Reputation: 5
Post: #3
RE: Whats wrong with my script?
I have it like this now but it says Expected identifier on 1, 25 what do I need to do?

AddUseItemCallback("" , "roomkey_1" , "door_to_outside" , "UsedKeyOnDoor" , true);

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door_to_outside" , false , true);
PlaySoundAtEntity("" , "unlock_door" , "door_to_outside" , 0, false);
RemoveItem("roomkey_1");
}

void OnEnter()
{
AddEntityCollideCallback("Player", "Intro_Quest_Area", "GetIntroQuest", true, 1);
AddEntityCollideCallback("Player", "Intro_Complete_Area", "FinishIntroQuest", true, 1);
}

void GetIntroQuest(string &in asParent, string &in asChild, int alState)
{
AddQuest("introquest", "IntroQuest");
}

void FinishIntroQuest(string &in asParent, string &in asChild, int alState)
{
CompleteQuest("introquest", "IntroQuest");
}

The Elder Sign: The Asylum [45%]
This forum is dying.
07-27-2011 06:45 PM
Find all posts by this user Quote this message in a reply
Kyle Offline
Posting Freak

Posts: 910
Joined: Sep 2010
Reputation: 7
Post: #4
RE: Whats wrong with my script?
Is this all of your script? You're missing a void OnStart() function and also should put those AddEntityCollideCallbacks from void OnEnter() into void OnStart()

07-27-2011 07:30 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)