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 .hps help
pandasFTW Offline
Member

Posts: 71
Threads: 21
Joined: Feb 2012
Reputation: 2
#1
need .hps help

alright, first of alll ,id like to ask of someone has a good way of finding the bugs of your .hps? because i can never seem to find them... when thats said, i need help with my .hps, and i cant find the mistake, can you guys help? the error says

main (9, 64): Expected ")" or ","
main (50, 4) : Expected ","


please help, here are my . hps


void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "prut", true, 1);
AddUseItemCallback("", "knife1", "prison1", "lolskid", true);
AddEntityCollideCallback("Player", "ScriptArea_2", "karl", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_3", "scare1", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_4", "scare2", true, 1);
AddEntityCollideCallback("Player", "Area2", "scare4", true, 1);
AddEntityCollideCallback("Player", "Area1", "pewdiepie1", 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 scare1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("grunt2", true);
}

void scare2(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("corpse1", true);
PlaySoundAtEntity
GiveSanityDamage(15.0f, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
PlaySoundAtEntity("", "24_iron_maiden.snt", "Player", 0, false);
AddTimer("", 1.5, "Deadguy1");
}

void pewdiepie1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("pig1", true);
PlaySoundAtEntity("", "00_laugh.snt", "Player", 0, false);
SetMessage("Message", "pig1", 2);
}

void scare4(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "brute/enabled04.snt", "Area3", 0, false);
}

void Deadguy1(string &in asTimer)
{
SetEntityActive("corpse1", false);
}

void scare3(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "24_iron_maiden.snt", "Player", 0, 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 prison1(string &in asEntity)
{
SetMessage("Message", "prison", 0);
}

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

void OnLeave()
{
}
03-23-2012, 03:35 PM
Find Reply
Stepper321 Offline
Senior Member

Posts: 263
Threads: 26
Joined: Nov 2011
Reputation: 8
#2
RE: need .hps help

AddEntityCollideCallback("Player", "Area1", "pewdiepie1", true(comma) 1); You forgot a comma right there.
PlaySoundAtEntity Play what? Where? What Sound File?
It misses that. Remove it or somethin.


Next time go look at the error what it stands
main (9, 64): Expected ")" or ","
the first digit is your line, line 9,
the second two digits are the place it stands from left to right, 64.
Then go look what you miss.

Signature to awesome to be displayed.
03-23-2012, 03:53 PM
Find Reply
pandasFTW Offline
Member

Posts: 71
Threads: 21
Joined: Feb 2012
Reputation: 2
#3
RE: need .hps help

I usually do that, but it misleads me... it leads me to the end of void OnLeave... but that isnt where the error is... but thanks ! Smile
03-23-2012, 04:40 PM
Find Reply
Stepper321 Offline
Senior Member

Posts: 263
Threads: 26
Joined: Nov 2011
Reputation: 8
#4
RE: need .hps help

(03-23-2012, 04:40 PM)pandasFTW Wrote: I usually do that, but it misleads me... it leads me to the end of void OnLeave... but that isnt where the error is... but thanks ! Smile
When you got that, you missed an " somewhere.

Signature to awesome to be displayed.
03-23-2012, 05:59 PM
Find Reply




Users browsing this thread: 1 Guest(s)