![]() |
FATAL ERROR - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: FATAL ERROR (/thread-17402.html) |
FATAL ERROR - skatekai - 08-01-2012 Why do I say you can not load the script file? FATAL ERROR: Could not load script file 'custom_stories/Map/custom_stories/Map/maps/C:/Program Files(x86)Amnesia- the dark descent/redist/custom_stories/Map/Maps/mapa05.hps! main(19,3) : ERR : No matching signatures to 'CheckValue(string&)' main(31,3) : ERR : No matching signatures to 'CheckValue(string&)' Script : 19: CheckValue(asEntity); 31: CheckValue(asEntity); RE: FATAL ERROR - Steve - 08-01-2012 could you give us some more information(I mean more like the entire script or a bigger part or something...) RE: FATAL ERROR - skatekai - 08-01-2012 (08-01-2012, 02:46 PM)Steve Wrote: could you give us some more information(I mean more like the entire script or a bigger part or something...)The error here: 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); 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); 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); } } RE: FATAL ERROR - Seragath - 08-01-2012 Not entirely sure but do the " else if " work ? I believe I once tried it myself and it didn't work. Might be my error was else where..I'll keep looking at the script see if I find something. RE: FATAL ERROR - SilentStriker - 08-01-2012 else if works and I don't think that part of the script is your problem. It has something to do with a Checkvalue function RE: FATAL ERROR - skatekai - 08-01-2012 (08-01-2012, 03:02 PM)SilentStriker Wrote: else if works and I don't think that part of the script is your problem. It has something to do with a Checkvalue functionTe pongo todo el el script, ya he arreglado lo de CheckValue ahora me da otro FATAL ERROR que es: main(86,2) Unexpected end of file Script : //////////////////////////// // 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 posotions*/ 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() { } RE: FATAL ERROR - SilentStriker - 08-01-2012 CheckValue(asEntity); that is your problem. It's not inside any function and it doesn't call anything. RE: FATAL ERROR - skatekai - 08-01-2012 (08-01-2012, 03:14 PM)SilentStriker Wrote: CheckValue(asEntity); that is your problem. It's not inside any function and it doesn't call anything. No such error is already fixed, but now I get another error which is this: FATAL ERROR is: main (86.2) Unexpected end of file RE: FATAL ERROR - Steve - 08-01-2012 (08-01-2012, 03:21 PM)skatekai Wrote:(08-01-2012, 03:14 PM)SilentStriker Wrote: No such error is already fixed, but now I get another error which is this: EDIT: Sorry I didn't see an { ![]() RE: FATAL ERROR - skatekai - 08-01-2012 (08-01-2012, 03:27 PM)Steve Wrote:(08-01-2012, 03:21 PM)skatekai Wrote:(08-01-2012, 03:14 PM)SilentStriker Wrote: No such error is already fixed, but now I get another error which is this: I can not delete CheckValue if the map does not work some other solution? |