Frictional Games Forum (read-only)

Full Version: main (22, 1): ERR : Expected ',' or ';' Please Help Guys ASAP thanks
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
////////////////////////////
// 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
Two functions, first one without body

Code:
void EventCollide(string &in asParent, string &in asChild, int alState)
void EventCollide_2(string &in asParent, string &in asChild, int alState)
what do u mean first one without body. sorry Im new to scripting. Smile
(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. -> { }

Code:
void Function1(parameters...) {

//This is a function body

}
Thanks guys I got it working Smile YAY!