lolboy9797
Junior Member
Posts: 29
Threads: 8
Joined: May 2012
Reputation:
1
|
Expected ')' or ',' error
hi,
i get this error on my script, saying "Expected ) or ," any help?
line 8, 73
code:
void OnStart()
{
AddEntityCollideCallback("Player", "KillTheLights", "LightsOut", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_4", "scare2", true, 1);
AddUseItemCallback("", "ITEM", "DOOR", "FUNCTION", true);
AddUseItemCallback("", "ITEM2", "DOOR2", "FUNCTION2", true);
AddEntityCollideCallback("Player", "Message_1", "Message1", true,
AddEntityCollideCallback("Player", "stascare_01", "armorscare", true, 1);
}
void Message1(string &in asChild, string &in asParent, int alState)
{
SetMessage("Messages", "Popup2", 2);
}
void scare2(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("mrscare1", true);
AddPropForce("mrscare1", -20000, 0, 0, "world");
PlaySoundAtEntity("mrscare1", "scare_slam_door", "mrscare1", 0, false);
}
void FUNCTION(string &in item, string &in door)
{
SetSwingDoorLocked(door, false, true);
PlaySoundAtEntity("", "unlock_door", door, 0, false);
RemoveItem(item);
}
void DoorLockedPlayer(string &in entity)
{
if(GetSwingDoorLocked("EXAMPLE_DOOR") == true)
{
SetMessage("Messages", "msgname", 0);
}
}
void doorl2(string &in entity)
{
if(GetSwingDoorLocked("locked_door1") == true)
{
SetMessage("Messages", "msgname1", 2);
}
}
void doorl1(string &in entity)
{
if(GetSwingDoorLocked("DOOR") == true)
{
SetMessage("Messages", "door_lockedmsg", 2);
}
}
void LightsOut(string &in asParent, string &in asChild, int alState)
{
SetLampLit("lamp_1", false, true);
AddTimer("", 1, "Out2");
GiveSanityDamage(2, true);
SetMessage("Messages", "Popup1", 2);
}
void Out2(string &in asTimer)
{
SetLampLit("lamp_2", false, true);
AddTimer("", 1, "Out3");
}
void Out3(string &in asTimer)
{
SetLampLit("lamp_3", false, true);
AddTimer("", 0.5, "Out4");
}
void Out4(string &in asTimer)
{
SetLampLit("lamp_4", false, true);
AddTimer("", 1, "Out5");
}
void Out5(string &in asTimer)
{
SetLampLit("lamp_5", false, true);
AddTimer("", 1, "Out6");
}
void Out6(string &in asTimer)
{
SetLampLit("lamp_6", false, true);
}
void tinderfunc1(string &in asEnity, string &in Type)
{
SetPropHealth("vase01_1",0);
StartPlayerLookAt("vase01_1", 20, 20, "");
AddTimer("timer1", 1, "timer1");
}
void timer1(string &in asTimer)
{
StopPlayerLookAt();
}
void armorscare(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("armour_02", true);
SetEntityActive("armour_03", true);
SetEntityActive("armour_04", true);
SetEntityActive("armour_05", true);
GiveSanityDamage(2, true);
}
|
|
05-15-2012, 05:59 PM |
|
Traggey
is mildly amused
Posts: 3,257
Threads: 74
Joined: Feb 2012
Reputation:
185
|
RE: Expected ')' or ',' error
Posted in the wrong section, I'm moving this to development support.
|
|
05-15-2012, 06:04 PM |
|
Stepper321
Senior Member
Posts: 263
Threads: 26
Joined: Nov 2011
Reputation:
8
|
RE: Expected ')' or ',' error
That's it, i'm creating how to find an error on the wiki.
void OnStart()
{
AddEntityCollideCallback("Player", "KillTheLights", "LightsOut", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_4", "scare2", true, 1);
AddUseItemCallback("", "ITEM", "DOOR", "FUNCTION", true);
AddUseItemCallback("", "ITEM2", "DOOR2", "FUNCTION2", true);
AddEntityCollideCallback("Player", "Message_1", "Message1", true, <--- Where is it? You forgot ");"
AddEntityCollideCallback("Player", "stascare_01", "armorscare", true, 1);
}
Signature to awesome to be displayed.
(This post was last modified: 05-15-2012, 06:12 PM by Stepper321.)
|
|
05-15-2012, 06:11 PM |
|
lolboy9797
Junior Member
Posts: 29
Threads: 8
Joined: May 2012
Reputation:
1
|
RE: Expected ')' or ',' error
(05-15-2012, 06:11 PM)Stepper321 Wrote: That's it, i'm creating how to find an error on the wiki.
void OnStart()
{
AddEntityCollideCallback("Player", "KillTheLights", "LightsOut", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_4", "scare2", true, 1);
AddUseItemCallback("", "ITEM", "DOOR", "FUNCTION", true);
AddUseItemCallback("", "ITEM2", "DOOR2", "FUNCTION2", true);
AddEntityCollideCallback("Player", "Message_1", "Message1", true, <--- Where is it? You forgot ");"
AddEntityCollideCallback("Player", "stascare_01", "armorscare", true, 1);
} still getting an error: 7, 66
|
|
05-15-2012, 06:15 PM |
|
Stepper321
Senior Member
Posts: 263
Threads: 26
Joined: Nov 2011
Reputation:
8
|
RE: Expected ')' or ',' error
(05-15-2012, 06:15 PM)lolboy9797 Wrote: (05-15-2012, 06:11 PM)Stepper321 Wrote: That's it, i'm creating how to find an error on the wiki.
void OnStart()
{
AddEntityCollideCallback("Player", "KillTheLights", "LightsOut", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_4", "scare2", true, 1);
AddUseItemCallback("", "ITEM", "DOOR", "FUNCTION", true);
AddUseItemCallback("", "ITEM2", "DOOR2", "FUNCTION2", true);
AddEntityCollideCallback("Player", "Message_1", "Message1", true, <--- Where is it? You forgot ");"
AddEntityCollideCallback("Player", "stascare_01", "armorscare", true, 1);
} still getting an error: 7, 66
replace AddEntityCollideCallback("Player", "Message_1", "Message1", true,
with AddEntityCollideCallback("Player", "Message_1", "Message1", true);
You also had an extra , at the end :p
Signature to awesome to be displayed.
|
|
05-15-2012, 06:16 PM |
|
lolboy9797
Junior Member
Posts: 29
Threads: 8
Joined: May 2012
Reputation:
1
|
RE: Expected ')' or ',' error
(05-15-2012, 06:16 PM)Stepper321 Wrote: (05-15-2012, 06:15 PM)lolboy9797 Wrote: (05-15-2012, 06:11 PM)Stepper321 Wrote: That's it, i'm creating how to find an error on the wiki.
void OnStart()
{
AddEntityCollideCallback("Player", "KillTheLights", "LightsOut", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_4", "scare2", true, 1);
AddUseItemCallback("", "ITEM", "DOOR", "FUNCTION", true);
AddUseItemCallback("", "ITEM2", "DOOR2", "FUNCTION2", true);
AddEntityCollideCallback("Player", "Message_1", "Message1", true, <--- Where is it? You forgot ");"
AddEntityCollideCallback("Player", "stascare_01", "armorscare", true, 1);
} still getting an error: 7, 66
replace AddEntityCollideCallback("Player", "Message_1", "Message1", true,
with AddEntityCollideCallback("Player", "Message_1", "Message1", true);
You also had an extra , at the end :p new error: No matching signatur to 'AddEntityCollideCallBack(string@, string@, const bool)' line(7, 1)
(This post was last modified: 05-15-2012, 06:22 PM by lolboy9797.)
|
|
05-15-2012, 06:22 PM |
|
Cranky Old Man
Posting Freak
Posts: 986
Threads: 20
Joined: Apr 2012
Reputation:
38
|
RE: Expected ')' or ',' error
(05-15-2012, 06:15 PM)lolboy9797 Wrote: still getting an error: 7, 66 "7, 66" doesn't mean "Page 7, line 66 in the Amnesia Wizards Debugging Spellbook".
It means: "Line 7, character 66."
It's probably the same line as before, and my guess is that you forgot the last parameter.
|
|
05-15-2012, 06:24 PM |
|
lolboy9797
Junior Member
Posts: 29
Threads: 8
Joined: May 2012
Reputation:
1
|
RE: Expected ')' or ',' error
(05-15-2012, 06:24 PM)Cranky Old Man Wrote: (05-15-2012, 06:15 PM)lolboy9797 Wrote: still getting an error: 7, 66 "7, 66" doesn't mean "Page 7, line 66 in the Amnesia Wizards Debugging Spellbook".
It means: "Line 7, character 66."
It's probably the same line as before, and my guess is that you forgot the last parameter. here is line 7:AddEntityCollideCallback("Player", "Message_1", "Message1", true);
what's wrong with it?
|
|
05-15-2012, 06:26 PM |
|
Cranky Old Man
Posting Freak
Posts: 986
Threads: 20
Joined: Apr 2012
Reputation:
38
|
RE: Expected ')' or ',' error
(05-15-2012, 06:22 PM)lolboy9797 Wrote: new error: No matching signatur to 'AddEntityCollideCallBack(string@, string@, const bool)' line(7, 1) How many parameters does AddEntityCollideCallBack() take?
How many parameters do you have?
Which one doesn't belong?
(This post was last modified: 05-15-2012, 06:27 PM by Cranky Old Man.)
|
|
05-15-2012, 06:26 PM |
|
Stepper321
Senior Member
Posts: 263
Threads: 26
Joined: Nov 2011
Reputation:
8
|
RE: Expected ')' or ',' error
You can always look here
Engine scripts [Frictional Game Wiki] and look for the error.
its this:
AddEntityCollideCallback("Player", "Message_1", "Message1", true, 1);
Signature to awesome to be displayed.
|
|
05-15-2012, 06:30 PM |
|
|