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
Help - Unexpected end of file
nemesis567 Offline
Posting Freak

Posts: 874
Threads: 65
Joined: May 2011
Reputation: 10
#10
RE: Help - Unexpected end of file

You mistyped the boolean operator in if(i = 18) where it should be if(i == 18).

Also, by doing:
PHP Code: (Select All)
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_1"+1718""); 
you are repeatdly adding a pathnode to the pathnodearea_117. I suppose you want what's bellow:
Correct code:

PHP Code: (Select All)
void OnStart()
{
    
SetEntityPlayerInteractCallback("button""func1"true);
    
wakeUp();
    
AddEntityCollideCallback("Player""MonsterArea""MonsterFunction"true1);
    
AddEntityCollideCallback("servant_grunt_1""PNScriptArea""MonsterFunction2"false1);
    
AddEntityCollideCallback("Crowbar_1""AreaPutCrowbar""CrowbarAppear"true1);
}

void CrowbarAppear(string &in asParentstring &in asChildint alState)
{
    
SetEntityActive("Crowbar_joint"true);
    
RemoveItem("Crowbar_1");
}

void BreakDoor(string &in asParentstring &in asChildint alState)
{
    
SetSwingDoorLocked("door"falsefalse);
    
CreateParticleSystemAtEntity("""ps_hit_wood""BreakEffect"false);
    
PlaySoundAtEntity("""break_wood""BreakEffect"0.0false);
    
SetEntityActive("Crowbar_joint"false);
    
SetEntityActive("crowbar_broken_1"true); //THIS SHOULD BE A CROWBAR ENTITY ONLY (NOT ITEM, NOT JOINT (name it crowbar)
}

    
void MonsterFunction(string &in asParentstring &in asChildint alState)
    {
    
SetEntityActive("servant_grunt_1"true);
    
SetEntityActive("block_box_1"true);
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_1"2"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_2"0"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_3"0"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_4"0"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_5"5"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_6"0"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_7"0"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_8"0"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_9"0"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_10"0"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_11"0"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_12"0"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_13"0"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_14"0"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_15"0"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_16"5"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_17"0"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_18"0"");
    for (
int i 1<11i++)
    {
        
int x i;
        if (
== 1)
        {
            
2;
        }
        if (
== 18)
        {
            
4;
        }
        if (
!= || != 18)
        {
            
0;
        }
        
//AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_"+17, 18, "");
    
}
    
SetMoveObjectState("shelf",0.0f);
}

        
void MonsterFunction2()
    {
        for (
int i 1<6i++)
        {
            
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_"+i0"");
        }        
    }

    
void wakeUp()
    {
        
PlayMusic("02_amb_strange.ogg"true511true);
        
FadeOut(0); // Instantly fades the screen out. (Good for starting the game)
        
FadeIn(20); // Amount of seconds the fade in takes
        
FadeImageTrailTo(22);
        
FadeSepiaColorTo(1004);
        
SetPlayerActive(false);
        
FadePlayerRollTo(50220220); // "Tilts" the players head
        
FadeRadialBlurTo(0.152);
        
SetPlayerCrouching(true); // Simulates being on the ground
        
AddTimer("trig1"11.0f"beginStory"); // Change ' 11.0f' to however long you want the 'unconciousness' to last
        
GiveSanityDamage(20true);
}

    
void beginStory(string &in asTimer)
    {
    
ChangePlayerStateToNormal();
    
SetPlayerActive(true);
    
FadePlayerRollTo(03333); // Change all settings to defaults
    
FadeRadialBlurTo(0.01);
    
FadeSepiaColorTo(04);
    
SetPlayerCrouching(false);
    
FadeImageTrailTo(0,1);
}

    
void func1(string &in asEntity)
    {
    
SetMoveObjectState("shelf",1.0f);
    
PlaySoundAtEntity("""quest_completed.snt""Player"0false);
    
GiveSanityBoost();
}

    
void OnEnter()
    {
}

    
void OnLeave()
    {



Your script, though is is bad organized and has useless stuff inside.

Today I dreamt the life I could live forever. You only know that when you feel it for you know not what you like until you've experienced it.
(This post was last modified: 12-12-2011, 11:29 PM by nemesis567.)
12-12-2011, 11:23 PM
Find


Messages In This Thread
Help - Unexpected end of file - by Victor - 12-05-2011, 11:17 PM
RE: Help - Unexpected end of file - by GillFrog - 12-05-2011, 11:45 PM
RE: Help - Unexpected end of file - by Victor - 12-06-2011, 01:28 AM
RE: Help - Unexpected end of file - by Victor - 12-06-2011, 01:52 AM
RE: Help - Unexpected end of file - by Victor - 12-06-2011, 02:40 AM
RE: Help - Unexpected end of file - by Victor - 12-06-2011, 07:37 PM
RE: Help - Unexpected end of file - by Fanskapi - 12-12-2011, 09:27 AM
RE: Help - Unexpected end of file - by nemesis567 - 12-12-2011, 11:23 PM



Users browsing this thread: 1 Guest(s)