The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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 [FIRST SCRIPT] unexpected end of file
Peldan Offline
Junior Member

Posts: 16
Threads: 3
Joined: Mar 2012
Reputation: 0
#1
[FIRST SCRIPT] unexpected end of file

Hey guys!

This is my first script ever, I am just playing around a little bit. Also took some help from tutorials.
However, when I added the Entity collision for the third room area, I started to get this error:

"Unexpected end of file". Any idea what's wrong? Confused

http://pastebin.com/fzi7bta2 Here's the code <-

PHP Code: (Select All)
void OnStart()
{
    
AddEntityCollideCallback("Player""RoomTwoArea""CollideRoomTwo"true1);
    
AddEntityCollideCallBack("Player""RoomThreeArea""CollideRoomThree"true1");
    AddUseItemCallback("", "
key_study_1", "mansion_2", "UnlockDD", true);
    AddUseItemCallback("", "
ceremony_knife_1", "work_desk_door_1", "UnlockDD", true);
    GiveItemFromFile("
lantern", "lantern.ent");
    SetPlayerLampOil(100.0f);
}

void CollideRoomTwo(string &in asParent, string &in asChild, int alState)
{
    SetSwingDoorClosed("
mansion_2", true, true);
    StartPlayerLookAt("
mansion_2", 10, 10, "");
    PlaySoundAtEntity("", "
00_laugh.snt", "mansion_2", 0, false);
    AddTimer("
close", 1, "stoplook");
}

void CollideRoomThree(string &in asParent, string &in asChild, int alState)
{
    SetEntityActive("
agrippa_head_1", true);
    StartPlayerLookAt("
agrippa_head_1", 10, 10, "");
    PlaySoundAtEntity("", "
00_laugh.snt", "graveyard_corpse_1", 0, false);
    AddTimer("
lolol", 1, "stoplook");
    SetPropHealth("
pot_explode", 0);
}

void UnlockDD(string &in item, string &in door)
{
    SetSwingDoorLocked(door, false, true);
    PlaySoundAtEntity("", "
scare_slam_door.snt", door, 0, false);
    RemoveItem(item);
}

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

void OnEnter()
{

}

void OnLeave()
{



EDIT: Finally found that little bastard Wink It was this:
PHP Code: (Select All)
AddEntityCollideCallBack("Player""RoomThreeArea""CollideRoomThree"true1"); 
(This post was last modified: 03-04-2012, 04:46 PM by Peldan.)
03-04-2012, 04:10 PM
Find


Messages In This Thread
[FIRST SCRIPT] unexpected end of file - by Peldan - 03-04-2012, 04:10 PM



Users browsing this thread: 1 Guest(s)