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
Script Help Unexpected end of file error problem :(
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#1
Unexpected end of file error problem :(

I don't get it! The code looks good for me, or maybe it's not in the hps file but it keeps getting me this error every time I keep loading my customs tory!

This is the error

---------------------------
FATAL ERROR
---------------------------
FATAL ERROR: Could not load script file 'custom_stories/Lifeless_The Abandon/maps/Lifeless_The Abandon.hps'!
main (69, 17) : ERR : Unexpected end of file

---------------------------
OK
---------------------------

Here is my script file

void OnStart()
{
wakeUp();
}

void wakeUp() {
FadeOut(0); // Instantly fades the screen out. (Good for starting the game)
FadeIn(10); // Amount of seconds the fade in takes
FadeImageTrailTo(2, 2);
FadeSepiaColorTo(0, 2);
SetPlayerActive(false);
FadePlayerRollTo(50, 220, 220); // "Tilts" the players head
FadeRadialBlurTo(0.5, 2);
SetPlayerCrouching(true); // Simulates being on the ground
PlayMusic("18_amb.ogg", true, 1, 4, 1, true);
AddEntityCollideCallback("Player", "AreaCollide", "EventCollide", true, 1);
AddTimer("trig1", 11.0f, "beginStory"); // Change '11.0f' to however long you want the 'unconciousness' to last
}

void beginStory(string &in asTimer) {
ChangePlayerStateToNormal();
SetPlayerActive(true);
FadePlayerRollTo(0, 33, 33); // Change all settings to defaults
FadeRadialBlurTo(0.0, 1);
FadeSepiaColorTo(0, 4);
SetPlayerCrouching(false);
FadeImageTrailTo(0,1);
SetPlayerLampOil(29);
GiveSanityDamage(80, false);
GivePlayerDamage(30 , "false" , false, false);
SetPlayerMoveSpeedMul(0.56f);
SetPlayerRunSpeedMul(0);
//SetPlayerLookSpeedMul(0.5);
AddUseItemCallback("", "HollowNeedle", "CellDoor", "UseHollowNeedleOnDoor", true);
}

void UseHollowNeedleOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("CellDoor", false, true);
PlaySoundAtEntity("", "unlock_door.ogg", asEntity, 0, false);
GiveSanityBoostSmall();
RemoveItem(asItem);
}

void EventCollide(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("CellGuardGrunt", true);
AddEnemyPatrolNode("CellGuardGrunt", "Node_1",0.001f, "");
AddEnemyPatrolNode("CellGuardGrunt", "Node_4",0.001f, "");
AddEnemyPatrolNode("CellGuardGrunt", "Node_6",0.001f, "");
AddEnemyPatrolNode("CellGuardGrunt", "Node_10",0.001f, "");
AddEnemyPatrolNode("CellGuardGrunt", "Node_15",0.001f, "");
AddEnemyPatrolNode("CellGuardGrunt", "Node_18",0.001f, "");
}


void UnlockDoor(string &in asEntity, int LeverState)
{
        if(GetLeverState("Lever1") == -1
        && GetLeverState("Lever2") == -1)
     GetLeverState("Lever3") == 1)
     GetLeverState("Lever4") == -1)

        {
                SetSwingDoorLocked("Door", false, true);
                PlaySoundAtEntity("", "unlock_door.snt", "Door", 0, false);
        }
}


I there is anyone who knows what's the problem or can guess where the error is, then pls help! thanks Smile
01-26-2014, 06:06 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#2
RE: Unexpected end of file error problem :(

I see your error, change this:

void UnlockDoor(string &in asEntity, int LeverState)
{
if(GetLeverState("Lever1") == -1
&& GetLeverState("Lever2") == -1)
GetLeverState("Lever3") == 1)
GetLeverState("Lever4") == -1)

{
SetSwingDoorLocked("Door", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "Door", 0, false);
}
}

For this:

void UnlockDoor(string &in asEntity, int LeverState)
{
if(GetLeverState("Lever1") == -1)
&& GetLeverState("Lever2") == -1)
GetLeverState("Lever3") == 1)
GetLeverState("Lever4") == -1)

{
SetSwingDoorLocked("Door", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "Door", 0, false);
}
}

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
01-26-2014, 06:14 PM
Find
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#3
RE: Unexpected end of file error problem :(

It gets me this error instead

---------------------------
FATAL ERROR
---------------------------
FATAL ERROR: Could not load script file 'custom_stories/Lifeless_The Abandon/maps/Lifeless_The Abandon.hps'!
main (60, 1) : ERR : Expected expression value

---------------------------
OK
---------------------------
(This post was last modified: 01-26-2014, 08:06 PM by Radical Batz.)
01-26-2014, 06:31 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#4
RE: Unexpected end of file error problem :(

So, it's fixed? That "OK" confuses me.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
01-26-2014, 09:18 PM
Find
RaideX Offline
Member

Posts: 212
Threads: 33
Joined: May 2013
Reputation: 7
#5
RE: Unexpected end of file error problem :(

(01-26-2014, 09:18 PM)The chaser Wrote: So, it's fixed? That "OK" confuses me.

I believe the "OK" is the Button from the error window Big Grin

If you don't draw first, you don't get to draw at all... -The False Shepherd
01-26-2014, 09:25 PM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#6
RE: Unexpected end of file error problem :(

PHP Code: (Select All)
if(GetLeverState("Lever1") == -1
&& GetLeverState("Lever2") == -1
GetLeverState
("Lever3") == 1
GetLeverState
("Lever4") == -1

Try that. It corrects the way the brackets are handled.

Discord: Romulator#0001
[Image: 3f6f01a904.png]
01-27-2014, 12:21 AM
Find
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#7
RE: Unexpected end of file error problem :(

(01-27-2014, 12:21 AM)Romulator Wrote:
PHP Code: (Select All)
if(GetLeverState("Lever1") == -1
&& GetLeverState("Lever2") == -1
GetLeverState
("Lever3") == 1
GetLeverState
("Lever4") == -1

Try that. It corrects the way the brackets are handled.

well now the error is telling me

---------------------------
FATAL ERROR
---------------------------
FATAL ERROR: Could not load script file 'custom_stories/Lifeless_The Abandon/maps/Lifeless_The Abandon.hps'!
main (61, 1) : ERR : Expected ')'

---------------------------
OK
---------------------------


Expected ')', does that mean I did that symbol on somewhere where I'm not supposed to put it, I don't get it In my code I simply have not mispelled anything, did I?
01-27-2014, 03:54 PM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#8
RE: Unexpected end of file error problem :(

No that means that particular symbol WAS SUPPOSED to be there, but it's not.
In the error, the engine expects a ")", but nothing.

"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 01-27-2014, 03:59 PM by PutraenusAlivius.)
01-27-2014, 03:58 PM
Find
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#9
RE: Unexpected end of file error problem :(

(01-27-2014, 03:58 PM)JustAnotherPlayer Wrote: No that means that particular symbol WAS SUPPOSED to be there, but it's not.
In the error, the engine expects a ")", but nothing.

but I don't know where it's supposed to be, pls help
01-27-2014, 07:49 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#10
RE: Unexpected end of file error problem :(

Try this then:

void UnlockDoor(string &in asEntity, int LeverState)
{
if(GetLeverState("Lever1") == -1)
&& (GetLeverState("Lever2") == -1)
(GetLeverState("Lever3") == 1)
(GetLeverState("Lever4") == -1)

{
SetSwingDoorLocked("Door", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "Door", 0, false);
}
}

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
01-27-2014, 11:22 PM
Find




Users browsing this thread: 5 Guest(s)