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
main (33,47) : ERR : Expected ')' or ','
Shives Offline
Member

Posts: 154
Threads: 41
Joined: Jan 2012
Reputation: 1
#1
main (33,47) : ERR : Expected ')' or ','

If I enter the map this happens

main (33,47) : ERR : Expected ')' or ','

Where's my mistake? I can't find it
Huh

////////////////////////////
// Run first time starting map
void OnStart()
{
SetLightVisible("PointLight_3", false);
AddEntityCollideCallback("Player", "ScriptArea_4", "Sound", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_3", "Wind", true, 1);
SetEntityCallbackFunc("crowbar_1", "picker");
AddEntityCollideCallback("Player", "ScriptArea_6", "Soundz", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_9", "Heartbeat", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_10", "StopHeart", true, 1);
SetEntityPlayerInteractCallback("chest_small_1", "Spieluhr", true);
AddEntityCollideCallback("Player", "ScriptArea_11", "Shadow", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_5", "Monster", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_8", "closet", true, 1);

}
    void Sound(string &in asParent, string &in asChild, int alState)
{
  PlaySoundAtEntity("", "guardian_distant1.snt", "Player", 0, false);
}
void picker(string &in asEntity, string &in type)
{
  SetEntityActive("ScriptArea_3", true);
  SetEntityActive("ScriptArea_11", true);
}
    void Wind(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage(1.0f, true);
  CreateParticleSystemAtEntity("", "ps_dust_push_15.ps", "ScriptArea_1", false);
  CreateParticleSystemAtEntity("", "ps_dust_push_15.ps", "ScriptArea_2", false);
  CreateParticleSystemAtEntity("", "ps_dust_whirl_large.ps", "ScriptArea_7", false);
FadeLightTo("PointLight_1", "PointLight_2", 0f, 0f, 0f, 1f, -1, 2);
PlaySoundAtEntity("", "scare_wind.snt", "Player", 0, false);
SetLampLit("chandelier_simple_short_1", false, true);
  AddTimer("", 2, "Noise");
}
  void Noise(string &in asTimer)
{
PlaySoundAtEntity("", "scare_wind_reverse.snt", "Player", 0, false);
}
    void Heartbeat(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("Heartbeat", "Heart.snt", "chest_small_1", 0, false);
StartPlayerLookAt("chest_small_1", 2, 1, "StopPlayerLookAt");
GiveSanityDamage(1.0f, true);
SetLightVisible("PointLight_3", true);
}
    void StopHeart(string &in asParent, string &in asChild, int alState)
{
  StopSound("Heartbeat", 2);
}
void Spieluhr(string &in asEntity)
{
  AddTimer("", 2, "Musik");
}
  void Musik(string &in asTimer)
{
SetEntityActive("ScriptArea_8", true);
SetEntityActive("ScriptArea_5", true);
PlaySoundAtEntity("", "Spieluhr.snt", "chest_small_1", 0, false);
}
    void Shadow(string &in asParent, string &in asChild, int alState)
{
  SetEntityActive("grunt", true);
GiveSanityDamage(1.0f, true);
}
    void Soundz(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "amb_idle_whimp.snt", "Player", 0, false);
}
    void Monster(string &in asParent, string &in asChild, int alState)
{
  SetEntityActive("servant_grunt_1", true);
  AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 2, "");
  AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
  AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "");
  AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0, "");
}

My Custom Story
http://www.frictionalgames.com/forum/thread-12587.html

Sorry for bad English


03-18-2012, 12:11 PM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#2
RE: main (33,47) : ERR : Expected ')' or ','


////////////////////////////
// Run first time starting map
void OnStart()
{
SetLightVisible("PointLight_3", false);
AddEntityCollideCallback("Player", "ScriptArea_4", "Sound", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_3", "Wind", true, 1);
SetEntityCallbackFunc("crowbar_1", "picker");
AddEntityCollideCallback("Player", "ScriptArea_6", "Soundz", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_9", "Heartbeat", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_10", "StopHeart", true, 1);
SetEntityPlayerInteractCallback("chest_small_1", "Spieluhr", true);
AddEntityCollideCallback("Player", "ScriptArea_11", "Shadow", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_5", "Monster", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_8", "closet", true, 1);

}
void Sound(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "guardian_distant1.snt", "Player", 0, false);
}
void picker(string &in asEntity, string &in type)
{
SetEntityActive("ScriptArea_3", true);
SetEntityActive("ScriptArea_11", true);
}

void Wind(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage(1.0f, true);
CreateParticleSystemAtEntity("", "ps_dust_push_15.ps", "ScriptArea_1", false);
CreateParticleSystemAtEntity("", "ps_dust_push_15.ps", "ScriptArea_2", false);
CreateParticleSystemAtEntity("", "ps_dust_whirl_large.ps", "ScriptArea_7", false);
PlaySoundAtEntity("", "scare_wind.snt", "Player", 0, false);
SetLampLit("chandelier_simple_short_1", false, true);
AddTimer("", 2, "Noise");
}

void Noise(string &in asTimer)
{
PlaySoundAtEntity("", "scare_wind_reverse.snt", "Player", 0, false);
}
void Heartbeat(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("Heartbeat", "Heart.snt", "chest_small_1", 0, false);
StartPlayerLookAt("chest_small_1", 2, 1, "StopPlayerLookAt");
GiveSanityDamage(1.0f, true);
SetLightVisible("PointLight_3", true);
}
void StopHeart(string &in asParent, string &in asChild, int alState)
{
StopSound("Heartbeat", 2);
}
void Spieluhr(string &in asEntity)
{
AddTimer("", 2, "Musik");
}
void Musik(string &in asTimer)
{
SetEntityActive("ScriptArea_8", true);
SetEntityActive("ScriptArea_5", true);
PlaySoundAtEntity("", "Spieluhr.snt", "chest_small_1", 0, false);
}
void Shadow(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("grunt", true);
GiveSanityDamage(1.0f, true);
}
void Soundz(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "amb_idle_whimp.snt", "Player", 0, false);
}
void Monster(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0, "");
}

Got rid of the fadelight. Use these instructions:

FadeLightTo(string& asLightName, float afR, float afG, float afB, float afA, float afRadius, float afTime);
Changes the properties of a light.
asLightName - internal name
afR - red value
afG - green value
afB - blue value
afA - alpha value
afRadius - radius of the light. -1 means keeping the radius
afTime - time in seconds until change is done

03-18-2012, 12:55 PM
Find
Shives Offline
Member

Posts: 154
Threads: 41
Joined: Jan 2012
Reputation: 1
#3
RE: main (33,47) : ERR : Expected ')' or ','

thank you,I replaced fade light with
SetLightVisible
Now it works

My Custom Story
http://www.frictionalgames.com/forum/thread-12587.html

Sorry for bad English


03-18-2012, 01:28 PM
Find
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#4
RE: main (33,47) : ERR : Expected ')' or ','

I think the only problem with your FadeLightTo was that you should have used "0.0f" instead of "0f"

03-18-2012, 07:07 PM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#5
RE: main (33,47) : ERR : Expected ')' or ','

Tried that didn't work

03-19-2012, 12:30 AM
Find




Users browsing this thread: 2 Guest(s)