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
ERROR
skatekai Offline
Junior Member

Posts: 15
Threads: 6
Joined: Jul 2012
Reputation: 0
#1
ERROR

I have a FATAL ERROR is:

FATAL ERROR: Could not load script file 'custom_stories / themap / ........... / Amnesia - The Dark Descent/redist/custom_stories/themap/Maps/map055.hps'!

main (86.2): ERR: Unexpected end of file

I leave the entire script mapa055:


////////////////////////////
// Run first time starting map
void OnStart()
{

}
void SixLevers(string &in asEntity, int alState)
{
/*Set values depending on up/down postion or 0 for middle
*/
if(alState == -1){
if(asEntity == "lever_machine_lever01_1") SetLocalVarInt("up_"+asEntity, 3);
else if(asEntity == "lever_machine_lever01_2") SetLocalVarInt("up_"+asEntity, 3);
else if(asEntity == "lever_machine_lever01_3") SetLocalVarInt("up_"+asEntity, 5);
else if(asEntity == "lever_machine_lever01_4") SetLocalVarInt("up_"+asEntity, 1);
else if(asEntity == "lever_machine_lever01_5") SetLocalVarInt("up_"+asEntity, 2);
else if(asEntity == "lever_machine_lever01_6") SetLocalVarInt("up_"+asEntity, 4);

CheckValue(asEntity);

AddDebugMessage("Lever Min & up value: " + GetLocalVarInt("up_value"), false);
}
else if(alState == 1){
if(asEntity == "lever_machine_lever01_1") SetLocalVarInt("down_"+asEntity, 1);
else if(asEntity == "lever_machine_lever01_2") SetLocalVarInt("down_"+asEntity, 5);
else if(asEntity == "lever_machine_lever01_3") SetLocalVarInt("down_"+asEntity, 6);
else if(asEntity == "lever_machine_lever01_4") SetLocalVarInt("down_"+asEntity, 5);
else if(asEntity == "lever_machine_lever01_5") SetLocalVarInt("down_"+asEntity, 2);
else if(asEntity == "lever_machine_lever01_6") SetLocalVarInt("down_"+asEntity, 2);

CheckValue(asEntity);

AddDebugMessage("Lever Max & down value: " + GetLocalVarInt("down_value"), false);
}
else if(alState == 0){
SetLocalVarInt("up_"+asEntity, 0);
SetLocalVarInt("down_"+asEntity, 0);

AddDebugMessage("Lever Mid", false);
}

/*All rods correct
*/
if(GetLocalVarInt("up_value") == 8 && GetLocalVarInt("down_value") == 8){
SetMessage("Ch01Level13", "EvenFlow", 0);

SetLocalVarInt("SticksOK", 1);

for(int i=1;i<7;i++)
SetLeverStuckState("machine_lever_"+i, GetLeverState("machine_lever_"+i), true);

for(int i=1;i<=6;i++){
CreateParticleSystemAtEntity("FlowP"+i, "ps_steam.ps", "FlowParticles_"+i, true);
PlaySoundAtEntity("FlowS"+i, "13_steam", "FlowParticles_"+i, 0.5, true);
}

PlaySoundAtEntity("done"+asEntity, "13_flow_done", asEntity, 0.0f, false);
}
}
/* Set value to 0 the add all the values from the levers to see sum of lever positions*/
void CheckValue(string sEntity)
{

PlaySoundAtEntity("s"+sEntity, "lever_mech_min_max", sEntity, 0.0f, false);

SetLocalVarInt("up_value", 0);
SetLocalVarInt("down_value", 0);

for(int i=1;i<=6;i++){
AddLocalVarInt("up_value", GetLocalVarInt("up_machine_lever_+i));
AddLocalVarInt("down_value", GetLocalVarInt("down_machine_lever_"+i));
}
}
////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}
(This post was last modified: 08-01-2012, 07:25 PM by skatekai.)
08-01-2012, 07:23 PM
Find
drunkmonk Offline
Member

Posts: 109
Threads: 7
Joined: Jun 2012
Reputation: 4
#2
RE: ERROR

your just missing a " at the end of your up_machine_lever_+i
this should fix it. Smile
for(int i=1;i<=6;i++){
AddLocalVarInt("up_value", GetLocalVarInt("up_machine_lever_"+i));
AddLocalVarInt("down_value", GetLocalVarInt("down_machine_lever_"+i));
}
}
08-01-2012, 07:40 PM
Find




Users browsing this thread: 1 Guest(s)