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
need help with script file!!!
pandasFTW Offline
Member

Posts: 71
Threads: 21
Joined: Feb 2012
Reputation: 2
#1
need help with script file!!!

hi all... so, when i try to start my custom story, it says " main(4:64): ERR : expected ")" or " , "
" main(5:68): ERR : expected ")" or " , "
" main(16:21): ERR : expected ")" or " , "
" main(17:21): ERR : expected ")" or " , "

please help, here are my script file


void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "prut", true, 1);
AddUseItemCallback("", "knife1", "prison1", "lolskid", true 1);
AddEntityCollideCallback("Player", "ScriptArea_2", "karl", true 1);
}

void OnEnter()
{
PlayMusic("03_amb.ogg", true, 0.6, 1, 8, true);
}

void karl(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("" , "notice.snt" , "ScriptArea_1" , 0.1f , true);
AddTimer("", 0.5 "timerr");
AddTimer("", 2.0 "timerrr");
}

void prut(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("hanging_prisoner_1", true);
SetEntityActive("hanging_prisoner_2", true);
PlaySoundAtEntity("", "21_screams.snt", "ScriptArea_1", 0.1f , true);
GiveSanityDamage(15.0f, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
AddTimer("", 1.0, "Intro");
}

void Intro(string &in asTimer)
{
SetEntityActive("hanging_prisoner_1", false);
SetEntityActive("hanging_prisoner_2", false);
}

void lolskid(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("prison1", false, true);
PlaySoundAtEntity("", "unlock_door", "door", 0, false);
RemoveItem("knife1");
AddPlayerSanity(10);
SetEntityActive("grunt1", true);
AddEnemyPatrolNode("grunt1", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_10", 0, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_12", 0, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_13", 0, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_14", 0, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_15", 0, "");
}

void timerr(string &in asTimer)
{
PlaySoundAtEntity("", "29_scream.snt", "ScriptArea_1", 0, false);
}

void timerrr(string &in asTimer)
{
PlaySoundAtEntity("", "attack_claw_hit.snt", "ScriptArea_1", 0, false);
}

void OnLeave()
{
}

thanks Smile
03-16-2012, 05:03 PM
Find
Stepper321 Offline
Senior Member

Posts: 263
Threads: 26
Joined: Nov 2011
Reputation: 8
#2
RE: need help with script file!!!


void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "prut", true, 1);
AddUseItemCallback("", "knife1", "prison1", "lolskid", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_2", "karl", true, 1);
}

void OnEnter()
{
PlayMusic("03_amb.ogg", true, 0.6, 1, 8, true);
}

void karl(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("" , "notice.snt" , "ScriptArea_1" , 0.1f , true);
AddTimer("", 0.5f, "timerr");
AddTimer("", 2.0f, "timerrr");
}

void prut(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("hanging_prisoner_1", true);
SetEntityActive("hanging_prisoner_2", true);
PlaySoundAtEntity("", "21_screams.snt", "ScriptArea_1", 0.1f , true);
GiveSanityDamage(15.0f, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
AddTimer("", 1.0, "Intro");
}

void Intro(string &in asTimer)
{
SetEntityActive("hanging_prisoner_1", false);
SetEntityActive("hanging_prisoner_2", false);
}

void lolskid(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("prison1", false, true);
PlaySoundAtEntity("", "unlock_door", "door", 0, false);
RemoveItem("knife1");
AddPlayerSanity(10);
SetEntityActive("grunt1", true);
AddEnemyPatrolNode("grunt1", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_10", 0, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_12", 0, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_13", 0, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_14", 0, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_15", 0, "");
}

void timerr(string &in asTimer)
{
PlaySoundAtEntity("", "29_scream.snt", "ScriptArea_1", 0, false);
}

void timerrr(string &in asTimer)
{
PlaySoundAtEntity("", "attack_claw_hit.snt", "ScriptArea_1", 0, false);
}

void OnLeave()
{
}


You forgot commas (,)

Signature to awesome to be displayed.
03-16-2012, 05:09 PM
Find
pandasFTW Offline
Member

Posts: 71
Threads: 21
Joined: Feb 2012
Reputation: 2
#3
RE: need help with script file!!!

thanks! Big Grin
03-16-2012, 05:21 PM
Find
Kreekakon Offline
Pick a god and pray!

Posts: 3,063
Threads: 70
Joined: Mar 2012
Reputation: 124
#4
RE: need help with script file!!!

For future reference, I'll tell you something useful when debugging. Forgive me if you already know this:

"main(4:64)"

When something like this pops up, the first number means which line of script(Counting down from the top) has encountered the problem, and the second means which character has encountered the problem.

This can prove to be rather useful.
03-16-2012, 05:42 PM
Find




Users browsing this thread: 1 Guest(s)