The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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 ','

main (180,3) : ERR : A function with the same name and parameters already exist
main (73,32) : ERR :Expected ')' or ','

I already looked for the mistake in the whole script, I couldn't find it.
I'm the biggest noob in the world in fixing mistakes. What I've done wrong this time?


My Script:

////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_12", "Whoa", true, 1);
SetLightVisible("SpotLight_11", false);
SetEntityPlayerInteractCallback("castle_1", "insanity", true);
AddEntityCollideCallback("Player", "ScriptArea_35", "Insanity", true, 1);
SetEntityConnectionStateChangeCallback("Lever_3", "Lever");
AddUseItemCallback("", "ItemLever_1", "Block", "UseLever", true);
AddEntityCollideCallback("Player", "ScriptArea_1", "End", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_11", "Wind", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_2", "Noise", true, 1);
AddEntityCollideCallback("castle_1", "ScriptArea_18", "In", true, 1);
AddEntityCollideCallback("enemy_suitor_2", "ScriptArea_31", "Var", true, 1);
AddEntityCollideCallback("enemy_suitor_2", "ScriptArea_18", "Activemaka", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_3", "Noisetwo", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_4", "Noisethree", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_5", "Suitor", true, 1);
AddEntityCollideCallback("enemy_suitor_1", "ScriptArea_6", "diss", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_6", "door", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_8", "Noisefour", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_9", "Noisefive", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_10", "Noisesix", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_29", "MonsterArea", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_30", "Monster", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_17", "book", true, 1);
AddEntityCollideCallback("book_bible_1", "ScriptArea_34", "damagebook", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_37", "enable", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_36", "enable", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_41", "disable", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_40", "disable", true, 1);
AddEntityCollideCallback("chair_nice01_9", "ScriptArea_42", "chairdamage", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_15", "chair", true, 1);
}
void Lever(string &in asEntity, int alState)
{
if (alState == 1)
{
CreateParticleSystemAtEntity("", "ps_dust_falling.ps", "ScriptArea_24", false);
ConnectEntities("door_connection", "Lever_3", "Secret", false, 1, "CreateDust");
CreateParticleSystemAtEntity("", "ps_dust_falling.ps", "ScriptArea_25", false);
CreateParticleSystemAtEntity("", "ps_dust_falling.ps", "ScriptArea_26", false);
CreateParticleSystemAtEntity("", "ps_dust_falling.ps", "ScriptArea_27", false);
CreateParticleSystemAtEntity("", "ps_dust_falling.ps", "ScriptArea_28", false);
}
}
void UseLever(string &in asItem, string &in asEntity)
{
SetEntityActive("Lever_1", true);
SetEntityActive("Lever", false);
SetEntityActive("Block", false);
PlaySoundAtEntity("wind", "01_whirl.snt", "ScriptArea_19", 0, false);
}
void End(string &in asParent, string &in asChild, int alState)
{
StartCredits("Endcredits.ogg", false, "Ending", "MainCredits", 1);
}
void enable(string &in asParent, string &in asChild, int alState)
{
SetEnemyDisabled("enemy_suitor_2", false);
}
void disable(string &in asParent, string &in asChild, int alState)
{
SetEnemyDisabled("enemy_suitor_2", true);
}
void chairdamage(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage(1.0f, true);
}
void chair(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity(enabled.snt", "chair_nice01_9", 0, false);
SetEntityActive("chair_nice01_9", true);
}
void Noise(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity(Windig.snt", "ScriptArea_39", 0, false);
CreateParticleSystemAtEntity("", "ps_dust_push_15.ps", "ScriptArea_38", false);
}
void Noise(string &in asParent, string &in asChild, int alState)
{
CreateParticleSystemAtEntity("", "ps_dust_whirl.ps", "ScriptArea_21", false);
CreateParticleSystemAtEntity("", "ps_dust_whirl_large.ps", "ScriptArea_20", false);
AddTimer("", 7, "stop");
FadeInSound("wind", 2.0f, false);
PlaySoundAtEntity("wind", "01_whirl.snt", "ScriptArea_19", 0, false);
}
void stop(string &in asTimer)
{
StopSound("wind", 2.0f);
}
void Noisetwo(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "Timid.snt", "ScriptArea_22", 0, false);
}
void Noisethree(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage(1.0f, true);
PlaySoundAtEntity("", "Bahro.snt", "ScriptArea_23", 0, false);
}
void Suitor(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage(1.0f, true);
SetEntityActive("enemy_suitor_1", true);
AddEnemyPatrolNode("enemy_suitor_1", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("enemy_suitor_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("enemy_suitor_1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("enemy_suitor_1", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("enemy_suitor_1", "PathNodeArea_5", 0, "");
}
void diss(string &in asParent, string &in asChild, int alState)
{
PlayMusic("Church.ogg", true, 0.7, 3, 0, true);
SetEntityActive("enemy_suitor_1", false);
}
void door(string &in asParent, string &in asChild, int alState)
{
PlayMusic("stayout.ogg", false, 70, 0, 0, true);
SetSwingDoorDisableAutoClose("Door_1", true);
SetSwingDoorClosed("Door_1",false, true);
AddPropForce("Door_1", 0, 0, -5220, "world");
CreateParticleSystemAtEntity("", "ps_dust_paper_blow.ps", "particle", false);
PlaySoundAtEntity("", "scare_wind.snt", "Player", 0, false);
PlaySoundAtEntity("", "scare_tingeling.snt", "Player", 0, false);
}
void Noisefour(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "Page.snt", "Player", 0, false);
}
void Noisefive(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "Timid.snt", "Player", 0, false);
}
void MonsterArea(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("ScriptArea_30", true);
}
void Monster(string &in asParent, string &in asChild, int alState)
{
AddTimer("", 1, "Monsta");
}
void Monsta(string &in asTimer)
{
SetPropHealth("castle_2", 0.0f);
AddEntityCollideCallback("Player", "ScriptArea_33", "Hide", false, 1);
AddEntityCollideCallback("Player", "ScriptArea_32", "Hide", false, 1);
SetLocalVarInt("Var02", 0);
SetEntityActive("enemy_suitor_2", true);
AddEnemyPatrolNode("enemy_suitor_2", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("enemy_suitor_2", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("enemy_suitor_2", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("enemy_suitor_2", "PathNodeArea_10", 0, "");
AddEnemyPatrolNode("enemy_suitor_2", "PathNodeArea_11", 0, "");
AddEnemyPatrolNode("enemy_suitor_2", "PathNodeArea_12", 0, "");
AddEnemyPatrolNode("enemy_suitor_2", "PathNodeArea_13", 0, "");
AddEnemyPatrolNode("enemy_suitor_2", "PathNodeArea_14", 0, "");
AddEnemyPatrolNode("enemy_suitor_2", "PathNodeArea_15", 0, "");
AddEnemyPatrolNode("enemy_suitor_2", "PathNodeArea_16", 0, "");
AddEnemyPatrolNode("enemy_suitor_2", "PathNodeArea_17", 0, "");
AddEnemyPatrolNode("enemy_suitor_2", "PathNodeArea_18", 0, "");
AddEnemyPatrolNode("enemy_suitor_2", "PathNodeArea_19", 0, "");
AddEnemyPatrolNode("enemy_suitor_2", "PathNodeArea_20", 0, "");
AddEnemyPatrolNode("enemy_suitor_2", "PathNodeArea_21", 0, "");
AddEnemyPatrolNode("enemy_suitor_2", "PathNodeArea_22", 0, "");
AddEnemyPatrolNode("enemy_suitor_2", "PathNodeArea_23", 0, "");
AddEnemyPatrolNode("enemy_suitor_2", "PathNodeArea_24", 0, "");
AddEnemyPatrolNode("enemy_suitor_2", "PathNodeArea_25", 0, "");
AddEnemyPatrolNode("enemy_suitor_2", "PathNodeArea_26", 0, "");
AddEnemyPatrolNode("enemy_suitor_2", "PathNodeArea_27", 0, "");
AddEnemyPatrolNode("enemy_suitor_2", "PathNodeArea_28", 0, "");
AddEnemyPatrolNode("enemy_suitor_2", "PathNodeArea_29", 0, "");
AddEnemyPatrolNode("enemy_suitor_2", "PathNodeArea_30", 0, "");
AddEnemyPatrolNode("enemy_suitor_2", "PathNodeArea_31", 0, "");
AddEnemyPatrolNode("enemy_suitor_2", "PathNodeArea_32", 0, "");
AddEnemyPatrolNode("enemy_suitor_2", "PathNodeArea_33", 0, "");
AddEnemyPatrolNode("enemy_suitor_2", "PathNodeArea_34", 0, "");
AddEnemyPatrolNode("enemy_suitor_2", "PathNodeArea_35", 0, "");
}
void Noisetwo(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("ScriptArea_31", true);
}
void Var(string &in asParent, string &in asChild, int alState)
{
AddEntityCollideCallback("Player", "ScriptArea_33", "Hide", false, 1);
AddEntityCollideCallback("Player", "ScriptArea_32", "Hide", false, 1);
SetEntityActive("ScriptArea_32", true);
SetEntityActive("ScriptArea_33", true);
AddLocalVarInt("Var02", 1);
EnemyDissapea();
}
void Hide(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("ScriptArea_32", false);
SetEntityActive("ScriptArea_33", false);
AddLocalVarInt("Var02", 1);
EnemyDissapea();
}
void EnemyDissapea()
{
if(GetLocalVarInt("Var02") == 2)
{
FadeEnemyToSmoke("enemy_suitor_2", true);
}
else
{
AddTimer("", 2, "Monsta");
}
}
void In(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage(10.0f, true);
PlaySoundAtEntity("", "Horror.snt", "Player", 0, false);
}
void book(string &in asParent, string &in asChild, int alState)
{
SetPropStaticPhysics("book_bible_1", false);
}
void damagebook(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage(1.0f, true);
}
void Whoa(string &in asParent, string &in asChild, int alState)
{
SetLightVisible("SpotLight_11", true);
PlaySoundAtEntity("", "Glow.snt", "Player", 0, false);
AddTimer("", 4, "Glow");
AddTimer("", 2, "Damage");
}
void Damage(string &in asTimer)
{
GiveSanityDamage(1.0f, true);
}
void Glow(string &in asTimer)
{
PlaySoundAtEntity("", "wholeGlow.snt", "Player", 0, false);
AddTimer("", 2, "Stop");
}
void Stop(string &in asTimer)
{
SetLightVisible("SpotLight_11", false);
}
////////////////////////////
// Run when entering map
void OnEnter()
{
PlayMusic("23_amb.ogg", true, 0.7, 3, 0, true);
FadeOut(0);
FadeIn(8);
}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

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

Sorry for bad English


07-07-2012, 01:32 PM
Find


Messages In This Thread
main (33,47) : ERR : Expected ')' or ',' - by Shives - 07-07-2012, 01:32 PM



Users browsing this thread: 2 Guest(s)