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
A script error
ObsidianLegion Offline
Member

Posts: 173
Threads: 53
Joined: Jun 2011
Reputation: 0
#1
A script error

This script is vital for the entertainment and there's an error

void OnStart()
{
    AddEntityCollideCallback("Player", "Identify", "CollideIdentify", true, 1);
    AddEntityCollideCallback("Player", "Suspicion", "CollideSuspicion", true, 1);
    SetEntityPlayerInteractCallback("Note06", "NoteText", true);
    SetEntityPlayerInteractCallback("Locked_1", "DoorText", true);
    SetEntityPlayerInteractCallback("Thingy_1", "MonsterSpawn", true);
    SetEntityPlayerInteractCallback("BlockingDoorBox_1", "UnblockDoor", true);
    AddUseItemCallback("", "OhMyGodKey_1", "OhMyGod_1", "UsedKeyOnDoor", true);
    AddCombineCallback("", "Potion_1", "Potion_2", CombineChem, true);
}

void OnEnter()
{
}

void OnLeave()
{
}

void CollideSuspicion(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("UnspokenWordsReference_1", 3.5f, 3.5f, "TimeReference");
AddTimer("TimeReference", 2.0f, "TimeReference");
SetMessage("StorageArea2", "Suspicion", 0);
}
    
void TimeReference(string &in asTimer)
{
StopPlayerLookAt();
AddQuest("quest5", "Quest5");
}

void NoteText(string &in asEntity)
{
SetMessage("StorageArea2", "NoteText", 0);
}

void MonsterSpawn(string &in asEnity);
{
SetEntityActive("MyNameIsBob_1", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("OhMyGod_1", true);
PlaySoundAtEntity("", "unlock_door.snt", "OhMyGod_1", 0, false);
}

void LockedText(string &in asEntity)
{
SetMessage("StorageArea2", "LockedText", 0);
}

void UnblockDoor(string &in asEntity)
{
SetSwingDoorLocked("Locked_1", false, true);
}

void CollideIdentify(string &in asParent, string &in asChild, int alState)
{
SetMessage("StorageArea2", "Identify", 0);
StartPlayerLookAt("BlockingDoorBox_1", 3.5f, 3.5f, "TimeRealise");
AddTimer("TimeRealise", 1.0f, "TimeRealise");
}

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

///////////////////////////////////////////////////////
//BEGIN EPOXY SCRIPT//////////////////////////////////
void CombineChem(string &in asItemA, string &in asItemB)
{
PlaySoundAtEntity("", "puzzle_acid.snt", "Player", 0, false);
GiveItem("", "chemical_container_epoxy", "Epoxy_1", "chemical_container_epoxy.tga", 1);
AddUseItemCallback("", "Epoxy_1", "BoomScript_1", "LeBigBoom", true);
}

void LeBigBoom(string &in asItem, string &in asEntity)
{
StartPlayerLookAt("ChemJar_1", 1.5f, 1.5f, "Timer1");
SetEntityActive("ChemJar_1", true);
RemoveItem("Epoxy_1");
AddTimer("Timer1", 0.8f, "TimerLookAt");
AddTimer("Timer2", 3.0f, "TimerExplosion");
PlaySoundAtEntity("", "12_epoxy_blow.snt", "ChemJar_1", 0, false);
PlaySoundAtEntity("", "puzzle_place_jar.snt", 0 ,false);
SetMessage("StorageArea2", "Panic", 0);
}

void TimerLookAt(string& asTimer)
{
StopPlayerLookAt()
}

void TimerExplosion(string& asTimer)
{
PlaySoundAtEntity("", "explosion_rock_large.snt", "cave_in_1", 0, false);
SetEntityActive("cave_in_1", false);
SetEntityActive("ChemJar_1" false);
}
//END EPOXY SCRIPT///////////////////////////////////
////////////////////////////////////////////////////

It comes up with the error

40,1:UNEXPECTED TOKEN "{"

"Good men mean well; they just don't always end up doing well." -Isaac Clarke, Dead Space 2, Chapter 12
(This post was last modified: 09-01-2011, 05:06 PM by ObsidianLegion.)
09-01-2011, 01:45 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: A script error

You're missing a semicolon after StopPlayerLookAt() in the function TimerLookAt(). You also put a semicolon after the function definition on line 39.

Tutorials: From Noob to Pro
(This post was last modified: 09-01-2011, 01:52 PM by Your Computer.)
09-01-2011, 01:49 PM
Website Find
ObsidianLegion Offline
Member

Posts: 173
Threads: 53
Joined: Jun 2011
Reputation: 0
#3
RE: A script error

(09-01-2011, 01:49 PM)Your Computer Wrote: You're missing a semicolon after StopPlayerLookAt() in the function TimerLookAt(). You also put a semicolon after the function definition on line 39.

Okay thanks dood Cool

Is that all?
(09-01-2011, 01:49 PM)Your Computer Wrote: You're missing a semicolon after StopPlayerLookAt() in the function TimerLookAt(). You also put a semicolon after the function definition on line 39.

It still doesn't work :/

"Good men mean well; they just don't always end up doing well." -Isaac Clarke, Dead Space 2, Chapter 12
(This post was last modified: 09-01-2011, 02:08 PM by ObsidianLegion.)
09-01-2011, 01:53 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#4
RE: A script error

(09-01-2011, 01:53 PM)Lolnesia09 Wrote: It still doesn't work :/

What error do you get?

Tutorials: From Noob to Pro
09-01-2011, 03:55 PM
Website Find
ObsidianLegion Offline
Member

Posts: 173
Threads: 53
Joined: Jun 2011
Reputation: 0
#5
RE: A script error

(09-01-2011, 03:55 PM)Your Computer Wrote:
(09-01-2011, 01:53 PM)Lolnesia09 Wrote: It still doesn't work :/

What error do you get?

nah. It's good. I came up with the same error.

Then I played it again and it told me different. So I've fixed it.

"Good men mean well; they just don't always end up doing well." -Isaac Clarke, Dead Space 2, Chapter 12
(This post was last modified: 09-01-2011, 05:06 PM by ObsidianLegion.)
09-01-2011, 05:06 PM
Find




Users browsing this thread: 1 Guest(s)