Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
script error[FIXED]
SilentHideButFine Offline
Member

Posts: 156
Threads: 38
Joined: May 2012
Reputation: 6
#1
script error[FIXED]

void OnStart()
{
SetEntityCallbackFunc("keynotwork", "PickUpKeyFunc");
AddEntityCollideCallback("servant_grunt_1", "ScriptArea_1", "remove", true, 1);
AddUseItemCallback("borkenKey", "keynotwork", "cellar_wood01_1", "BrokenKeyWontOpenDoor", true);
AddUseItemCallback("borkenKey", "Secret", "castle_4", "secretdoor1", true);
AddUseItemCallback("", "hollow_needle_1", "cellar_wood01_1", "key1", true);
AddEntityCollideCallback("Player", "HallowNeedle", "func1", true, 1);'
AddEntityCollideCallback("Player", "ScriptArea_2", "func2", true, 1);
AddEntityCollideCallback("servant_brute_1", "ScriptArea_3", "func3", true, 1);
}
void func3(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_brute_1", false);
}



void func2(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_brute_1", true);
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_7", 2, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_8", 2, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_9", 2, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_10", 2, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_11", 2, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_12", 2, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_13", 2, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_14", 2, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_15", 2, "");
}

void secretdoor1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("castle_4", false, true);
PlaySoundAtEntity("", "unlock_door", "castle_4", 0, true);
RemoveItem("Secret");
GiveSanityBoostSmall();
}
void key1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("cellar_wood01_1", false, true);
PlaySoundAtEntity("", "unlock_door", "cellar_wood01_1", 0, true);
RemoveItem("hollow_needle_1");
GiveSanityBoostSmall();
}

void func1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("hanging_prisoner_1", true);
SetEntityActive("hanging_prisoner_2", true);
SetEntityActive("hollow_needle_1", true);
PlaySoundAtEntity("scream_sound", "24_iron_maiden.snt", "hanging_prisoner_2", 1, true);
PlaySoundAtEntity("scream_sound1", "24_iron_maiden.snt", "hanging_prisoner_1", 1, true);
SetMessage("Message", "HallowNeedle", 3);
}
void BrokenKeyWontOpenDoor(string &in asItem, string &in asEntity)
{
SetMessage("Message", "brokenkey", 5);
RemoveItem("keynotwork");
PlaySoundAtEntity("", "locked_door.snt", "cellar_wood01_3", 0, true);
}

void remove(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", false);
FadeEnemyToSmoke("servant_grunt_1", true);
}


void PickUpKeyFunc(string &in entity, string &in type)
{
if(type == "OnPickup")
{
SetPlayerActive(false);
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 2, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 2, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 2, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 2, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_6", 2, "");
StartPlayerLookAt("castle_2", 5, 5, "");
PlaySoundAtEntity("", "react_scare.snt", "mansion_2", 0, false);
GiveSanityDamage(40, true);
SetSwingDoorLocked("cellar_wood01_3", false, true);
GiveSanityBoostSmall();
AddTimer("StopLookAt", 3, "StopLookAtEvent");
}
}
void StopLookAtEvent(string &in asTimer)
{
SetPlayerActive(true);
StopPlayerLookAt();
} here!

it says error

[url= http://www.moddb.com/mods/jessehmusic [/url] ,HOSPITAL OF HORROR MOD
(This post was last modified: 06-18-2012, 05:13 PM by SilentHideButFine.)
06-17-2012, 09:04 PM
Find
GrAVit Offline
Senior Member

Posts: 580
Threads: 15
Joined: Oct 2011
Reputation: 22
#2
RE: script error

What is the error message?

06-17-2012, 09:10 PM
Find
SilentHideButFine Offline
Member

Posts: 156
Threads: 38
Joined: May 2012
Reputation: 6
#3
RE: script error

(06-17-2012, 09:10 PM)GrAVit Wrote: What is the error message?
Unexpeded file 92.2

[url= http://www.moddb.com/mods/jessehmusic [/url] ,HOSPITAL OF HORROR MOD
06-17-2012, 09:11 PM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#4
RE: script error

Shouldn't line 71+73 be :


void PickUpKeyFunc(string &in asEntity, string &in asType) //////revised type to asType
{
if(asType == "OnPickup") //////revised type to asType


That's the only fishy thing I see in the script; all quotations, semicolons and callback syntax appear to be present and correct. For some reason, I don't feel like this well help too much : /

I'll keep looking!

I rate it 3 memes.
06-17-2012, 10:20 PM
Find
SilentHideButFine Offline
Member

Posts: 156
Threads: 38
Joined: May 2012
Reputation: 6
#5
RE: script error

(06-17-2012, 10:20 PM)andyrockin123 Wrote: Shouldn't line 71+73 be :


void PickUpKeyFunc(string &in asEntity, string &in asType) //////revised type to asType
{
if(asType == "OnPickup") //////revised type to asType


That's the only fishy thing I see in the script; all quotations, semicolons and callback syntax appear to be present and correct. For some reason, I don't feel like this well help too much : /

I'll keep looking!
void PickUpKeyFunc(string &in asEntity, string &in asType) //////revised type to asType
{
if(asType == "OnPickup") //////revised type to asType

what you mean?

[url= http://www.moddb.com/mods/jessehmusic [/url] ,HOSPITAL OF HORROR MOD
06-18-2012, 05:18 AM
Find
SilentHideButFine Offline
Member

Posts: 156
Threads: 38
Joined: May 2012
Reputation: 6
#6
RE: script error

Anyone know the problem?

[url= http://www.moddb.com/mods/jessehmusic [/url] ,HOSPITAL OF HORROR MOD
06-18-2012, 02:27 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#7
RE: script error

Unexpected end of file usually means you wanted to have 2 " ", but you mistakely only made 1 " so now it is open, and the file is ending, open.

Though i can't seem to find any.

If it is the OnPickup that makes the issue why not then try:

SetEntityPlayerInteractCallback

Trying is the first step to success.
(This post was last modified: 06-18-2012, 03:56 PM by FlawlessHappiness.)
06-18-2012, 03:53 PM
Find
SilentHideButFine Offline
Member

Posts: 156
Threads: 38
Joined: May 2012
Reputation: 6
#8
RE: script error

(06-18-2012, 03:53 PM)beecake Wrote: Unexpected end of file usually means you wanted to have 2 " ", but you mistakely only made 1 " so now it is open, and the file is ending, open.








well i cant find the issue :S

[url= http://www.moddb.com/mods/jessehmusic [/url] ,HOSPITAL OF HORROR MOD
06-18-2012, 03:55 PM
Find




Users browsing this thread: 2 Guest(s)