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
Unexpected end of file..i need help
Janni1234 Offline
Member

Posts: 134
Threads: 24
Joined: Jan 2011
Reputation: 1
#1
Unexpected end of file..i need help

here is my script:

void OnStart()
{
AddUseItemCallback("", "bucket_of_tar_1", "crowbar_broken_1", "UseTarOnCrowbar", true);
AddUseItemCallback("crowbarondoor", "crowbar_1", "prison_section_1","UseCrowbarOnDoor", true);
AddUseItemCallback("crowbaronframe", "crowbar_1", "AreaUseCrowbar", "UseCrowbarOnDoor", true);
AddEntityCollideCallback("crowbar_joint_1", "BreakDoor", "CollideAreaBreakDoor", true, 1);
AddEntityCollideCallback("Player", "change", "change", true, 1);
SetLocalVarInt("Lev", 1);
SetEntityConnectionStateChangeCallback("lever", "l1");
}

void UseTarOnCrowbar(string &in asItem, string &in asEntity)
{
StartPlayerLookAt("tar", 4.0, 3.0f, "");
AddTimer("Timer", 0.2f, "tarused");
PlaySoundAtEntity("", "21_meat01.snt", "Player", 0, false);
}

void tarused(string &in asTimer)
{
GiveSanityBoost();
StopPlayerLookAt();
SetEntityActive("crowbar_broken_1", false);
SetEntityActive("crowbar_1", true);
}



void UseCrowbarOnDoor(string &in asItem, string &in asEntity)
{
AddTimer(asEntity, 0.2, "TimerSwitchShovel");
PlaySoundAtEntity("pickupcrow","player_crouch.snt", "Player", 0.05, false);

//Remove callback incase player never touched door
SetEntityPlayerInteractCallback("prison_section_1", "", true);
SetEntityPlayerInteractCallback("AreaUseCrowbar", "", true);

RemoveItem(asItem);
}
void TimerSwitchShovel(string &in asTimer)
{
PlaySoundAtEntity("attachshovel","puzzle_place_jar.snt", asTimer, 0, false);

SetEntityActive("crowbar_joint_1", true);
}
void CollideAreaBreakDoor(string &in asParent, string &in asChild, int alState)
{
GiveSanityBoostSmall();

PlayMusic("10_puzzle01.ogg", false, 0.7, 0.1, 10, false);

SetSwingDoorLocked("prison_section_1", false, false);
SetSwingDoorDisableAutoClose("prison_section_1", true);
SetSwingDoorClosed("prison_section_1", false,false);

PlaySoundAtEntity("break","break_wood_metal", "AreaBreakEffect", 0, false);
CreateParticleSystemAtEntity("breakps", "ps_hit_wood", "AreaBreakEffect", false);
AddPropImpulse("prison_section_1", -3, 0, 0, "world");

SetEntityActive("crowbar_joint_1", false);
SetEntityActive("crowbar_dyn_1", true);

AddTimer("pushdoor", 0.1, "TimerPushDoor");
AddTimer("voice2", 1, "TimerDanielVoices");

CompleteQuest("10Door", "10Door");

AddDebugMessage("Break door!", false);
}
void TimerPushDoor(string &in asTimer)
{
AddPropImpulse("prison_section_1", -1, 2, -4, "world");
AddTimer("doorclose", 1.1, "TimerDoorCanClose");
}

void TimerDoorCanClose(string &in asTimer)
{
SetSwingDoorDisableAutoClose("prison_section_1", false);
}


void l1(string &in asEntity , int alState)
{
if (GetLeverState("lever") == 1)
{
AddTimer("Timer", 0.5f, "Ladder");
}


void Ladder(string &in asTimer)
{
PlaySoundAtEntity("", "close_gate.snt", "Player", 0, false);
StartPlayerLookAt("ladder4m_tileable_1", 4.0, 3.0f, "");
SetEntityActive("ladder4m_tileable_1", true);
SetEntityActive("LadderArea_1", true);
AddTimer("Timer", 0.5f, "lol");
}


void lol(string &in asTimer)
{
StopPlayerLookAt();
}

void change(string &in asParent , string &in asChild , int alState)
{
AddTimer("Timer", 0.1f, "changing");
}


void changing(string &in asTimer)
{
ChangeMap("Outside.map", "PlayerStartArea_1", "", "");
}


he says unexpected end of file.. in row 114
05-27-2011, 04:06 PM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#2
RE: Unexpected end of file..i need help

Change this part to this:

void l1(string &in asEntity , int alState)
{
     if (GetLeverState("lever") == 1)
     {
          AddTimer("Timer", 0.5f, "Ladder");
     }
}

05-27-2011, 04:55 PM
Find
Janni1234 Offline
Member

Posts: 134
Threads: 24
Joined: Jan 2011
Reputation: 1
#3
RE: Unexpected end of file..i need help

Okay thanks.
It works now
(This post was last modified: 05-27-2011, 05:12 PM by Janni1234.)
05-27-2011, 05:12 PM
Find




Users browsing this thread: 1 Guest(s)