Expected Scriptline?
Hey all,
I started a new custom story project last week and in the 1st map was this:
FATAL ERROR:Could not load script file '...'!
main (29,1): ERR :Expected ';'
my .hps file:
////////////////////////////
//Run first time starting map
void OnStart()
{
PlayMusic("race_menu.ogg", true, 1.0f, 0.5f, 0, true);
SetPlayerActive(false);
SetInventoryDisabled(true);
SetPlayerCrouchDisabled(true);
StartPlayerLookAt("enemy2_1", 10.0f, 8.7f, "");
AddTimer("lookat_timer", 4.0f, "sla1");
SetEnemyDisableTriggers("enemy2_1", true);
SetEnemyDisableTriggers("enemy2_2", true);
SetEnemyDisableTriggers("enemy2_3", true);
AddEnemyPatrolNode("enemy2_1", "PathNodeArea_1", 20, "idle.anm");
AddEnemyPatrolNode("enemy2_1", "PathNodeArea_4", 0, "attack_run.anm");
AddEnemyPatrolNode("enemy2_2", "PathNodeArea_2", 20, "idle.anm");
AddEnemyPatrolNode("enemy2_2", "PathNodeArea_5", 0, "attack_run.anm");
AddEnemyPatrolNode("enemy2_3", "PathNodeArea_3", 20, "idle.anm");
AddEnemyPatrolNode("enemy2_3", "PathNodeArea_6", 0, "attack_run.anm");
AddEntityCollideCallback("Player", "end_scf", "EndP", true, 1);
AddEntityCollideCallback("enemy2_1", "end_scf", "EndE", true, 1);
AddEntityCollideCallback("enemy2_2", "end_scf", "EndE", true, 1);
AddEntityCollideCallback("enemy2_3", "end_scf", "EndE", true, 1);
AddEntityCollideCallback("Player", "speed_one", "SpeedUp_1", true, 1);
AddEntityCollideCallback("enemy2_1", "speed_one", "SwitchEntity_1", true, 1);
AddEntityCollideCallback("enemy2_2", "speed_one", "SwitchEntity_2", true, 1);
AddEntityCollideCallback("enemy2_3", "speed_one", "SwitchEntity_3", true, 1);
AddEntityCollideCallback("Player", "speed_one_1", "SpeedUp_2", true, 1)
*THIS IS LINE 29* AddEntityCollideCallback("enemy2_1_2", "speed_one_1", "SwitchEntity_1_2", true, 1);
AddEntityCollideCallback("enemy2_2_2", "speed_one_1", "SwitchEntity_2_2", true, 1);
AddEntityCollideCallback("enemy2_3_2", "speed_one_1", "SwitchEntity_3_2", true, 1);
}
void sla1(string &in asTimer)
{
StopPlayerLookAt();
StartPlayerLookAt("enemy2_2", 12.0f, 10.0f, "");
AddTimer("lookat_timer", 3.0f, "sla2");
}
void sla2(string &in asTimer)
{
StopPlayerLookAt();
StartPlayerLookAt("enemy2_3", 3.0f, 1.0f, "");
AddTimer("lookat_timer", 2.2f, "sla3");
}
void sla3(string &in asTimer)
{
StopPlayerLookAt();
StartPlayerLookAt("PathNodeArea_2", 7.0f, 7.0f, "");
AddTimer("lookat_timer", 2.34f, "sla4");
}
void sla4(string &in asTimer)
{
PlayMusic("race_start.ogg", true, 1.0f, 1.0f, 0, true);
StopPlayerLookAt();
AddTimer("lookat_timer", 1.0f, "start");
}
void start(string &in asTimer)
{
StopMusic(1.0f, 0);
SetPlayerActive(true);
SetPlayerMoveSpeedMul(1000);
SetPlayerRunSpeedMul(99999);
}
void EndP(string &in asParent, string &in asChild, int alState)
{
SetPlayerActive(true);
StopMusic(1.0f, 0);
PlayMusic("race_win.ogg", true, 1.0f, 1.0f, 0, true);
StartEffectFlash(0.0f, 0.6f, 0.3f);
}
void EndE(string &in asEntity)
{
SetEnemyDisableTriggers("enemy2_1", false);
SetEnemyDisableTriggers("enemy2_2", false);
SetEnemyDisableTriggers("enemy2_3", false);
ShowEnemyPlayerPosition("enemy2_1");
ShowEnemyPlayerPosition("enemy2_2");
ShowEnemyPlayerPosition("enemy2_3");
SetPlayerActive(false);
StopMusic(1.0f, 0);
PlayMusic("race_lose.ogg", true, 1.0f, 1.0f, 0, true);
StartEffectFlash(0.0f, 0.6f, 0.3f);
}
void SpeedUp_1(string &in asParent, string &in asChild, int alState)
{
SetPlayerMoveSpeedMul(50);
SetPlayerRunSpeedMul(100);
}
void SwitchEntity_1(string &in asEntity)
{
SetEntityActive("enemy2_1", false);
SetEntityActive("enemy2_1_2", true);
AddEnemyPatrolNode("enemy2_1_2", "PathNodeArea_4", 0, "attack_run.anm");
}
void SwitchEntity_2(string &in asEntity)
{
SetEntityActive("enemy2_2", false);
SetEntityActive("enemy2_2_2", true);
AddEnemyPatrolNode("enemy2_2_2", "PathNodeArea_5", 0, "attack_run.anm");
}
void SwitchEntity_3(string &in asEntity)
{
SetEntityActive("enemy2_3", false);
SetEntityActive("enemy2_3_2", true);
AddEnemyPatrolNode("enemy2_3_2", "PathNodeArea_6", 0, "attack_run.anm");
}
void SpeedUp_2(string &in asParent, string &in asChild, int alState)
{
SetPlayerMoveSpeedMul(250);
SetPlayerRunSpeedMul(500);
}
void SwitchEntity_1_2(string &in asEntity)
{
SetEntityActive("enemy2_1", false);
SetEntityActive("enemy2_1_3", true);
AddEnemyPatrolNode("enemy2_1_3", "PathNodeArea_4", 0, "attack_run.anm");
}
void SwitchEntity_2_2(string &in asEntity)
{
SetEntityActive("enemy2_2", false);
SetEntityActive("enemy2_2_3", true);
AddEnemyPatrolNode("enemy2_2_3", "PathNodeArea_5", 0, "attack_run.anm");
}
void SwitchEntity_3_2(string &in asEntity)
{
SetEntityActive("enemy2_3", false);
SetEntityActive("enemy2_3_3", true);
AddEnemyPatrolNode("enemy2_3_3", "PathNodeArea_6", 0, "attack_run.anm");
}
I cannot find a fail at line 29, and I don't know what's wrong with the ;
Did you find it?
|