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
Script Help main (22, 1): ERR : Expected ',' or ';' Please Help Guys ASAP thanks
nathanial292 Offline
Junior Member

Posts: 3
Threads: 1
Joined: Sep 2013
Reputation: 0
#1
main (22, 1): ERR : Expected ',' or ';' Please Help Guys ASAP thanks

////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "Key_02", "castle_1", "UseKeyOnDoor", true);
}
void UseKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);
RemoveItem(asItem);
}

void OnEnter()
{
AddEntityCollideCallback("Player", "AreaCollide", "EventCollide", true, 1);
AddEntityCollideCallback("Player", "AreaCollide_3", "EventCollide_2", true, 1);
}

void EventCollide(string &in asParent, string &in asChild, int alState)
void EventCollide_2(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("grunt_2", true);
SetEntityActive("grunt_3", true);
SetEntityActive("grunt_4", true);
ShowEnemyPlayerPosition("grunt_2");
ShowEnemyPlayerPosition("grunt_3");
ShowEnemyPlayerPosition("grunt_4");

SetEntityActive("grunt_1", true);
AddEnemyPatrolNode("grunt_1", "Node_1", 0.001, "");
AddEnemyPatrolNode("grunt_1", "Node_2", 0.001, "");
AddEnemyPatrolNode("grunt_1", "Node_6", 0.001, "");
AddEnemyPatrolNode("grunt_1", "Node_9", 0.001, "");
AddEnemyPatrolNode("grunt_1", "Node_11", 0.001, "");
AddEnemyPatrolNode("grunt_1", "Node_13", 0.001, "");
AddEnemyPatrolNode("grunt_1", "Node_15", 0.001, "");
AddEnemyPatrolNode("grunt_1", "Node_16", 0.001, "");
}

void OnLeave()

{

}
Please help guys fast reponse if possible any help is apprechiated ;D
(This post was last modified: 09-14-2013, 05:10 PM by nathanial292.)
09-14-2013, 04:58 PM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#2
RE: main (22, 1): ERR : Expected ',' or ';' Please Help Guys ASAP thanks

Two functions, first one without body

void EventCollide(string &in asParent, string &in asChild, int alState)
void EventCollide_2(string &in asParent, string &in asChild, int alState)

09-14-2013, 05:19 PM
Find
nathanial292 Offline
Junior Member

Posts: 3
Threads: 1
Joined: Sep 2013
Reputation: 0
#3
RE: main (22, 1): ERR : Expected ',' or ';' Please Help Guys ASAP thanks

what do u mean first one without body. sorry Im new to scripting. Smile
09-14-2013, 05:24 PM
Find
Tomato Cat Offline
Senior Member

Posts: 287
Threads: 2
Joined: Sep 2012
Reputation: 20
#4
RE: main (22, 1): ERR : Expected ',' or ';' Please Help Guys ASAP thanks

(09-14-2013, 05:24 PM)nathanial292 Wrote: what do u mean first one without body. sorry Im new to scripting. Smile

Anything between the curly braces. -> { }

void Function1(parameters...) {

//This is a function body

}
(This post was last modified: 09-14-2013, 06:30 PM by Tomato Cat.)
09-14-2013, 06:29 PM
Find
nathanial292 Offline
Junior Member

Posts: 3
Threads: 1
Joined: Sep 2013
Reputation: 0
#5
RE: main (22, 1): ERR : Expected ',' or ';' Please Help Guys ASAP thanks

Thanks guys I got it working Smile YAY!
09-14-2013, 08:09 PM
Find




Users browsing this thread: 2 Guest(s)