Roenlond
Senior Member
Posts: 331
Threads: 3
Joined: Apr 2011
Reputation:
0
|
RE: Script error (forget it)
(05-01-2011, 10:29 AM)waqas12346 Wrote: Quote:void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "Function01", true, 1);
}
void Function01(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Monster", true);
AddEnemyPatrolNode("Monster", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_10", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_11", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_12", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_13", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_14", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_15", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_16", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_17", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_18", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_19", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_20", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_21", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_22", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_23", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_24", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_25", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_26", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_27", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_28", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_29", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_30", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_31", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_32", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_33", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_34", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_35", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_36", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_37", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_38", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_39", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_40", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_41", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_42", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_43", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_44", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_45", 0, "");
}
{
AddUseItemCallback("", "key_tower_1", "castle_arched01_7", "KeyOnDoor", true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "mansion_1", 0.0f, true);
}
main (55,1) : ERR : Unexpected token '{''
The bold part has no function and should therefore not have any {}'s. I would remove the brackets and move it up inside the OnStart function.
|
|