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

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

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);
08-01-2012, 02:39 PM
Find
Steve Offline
Member

Posts: 178
Threads: 17
Joined: Jun 2012
Reputation: 7
#2
RE: FATAL ERROR

could you give us some more information(I mean more like the entire script or a bigger part or something...)

CURRENTLY WORKING ON:
Final Light = 40%
Need of voice actors.
(This post was last modified: 08-01-2012, 02:46 PM by Steve.)
08-01-2012, 02:46 PM
Find
skatekai Offline
Junior Member

Posts: 15
Threads: 6
Joined: Jul 2012
Reputation: 0
#3
RE: FATAL ERROR

(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);
}
}
08-01-2012, 02:51 PM
Find
Seragath Offline
Junior Member

Posts: 34
Threads: 1
Joined: Jan 2011
Reputation: 0
#4
RE: FATAL ERROR

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.
08-01-2012, 02:55 PM
Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#5
RE: FATAL ERROR

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

08-01-2012, 03:02 PM
Find
skatekai Offline
Junior Member

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

(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 function
Te 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()
{

}
08-01-2012, 03:06 PM
Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#7
RE: FATAL ERROR

CheckValue(asEntity); that is your problem. It's not inside any function and it doesn't call anything.

08-01-2012, 03:14 PM
Find
skatekai Offline
Junior Member

Posts: 15
Threads: 6
Joined: Jul 2012
Reputation: 0
#8
RE: FATAL ERROR

(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
08-01-2012, 03:21 PM
Find
Steve Offline
Member

Posts: 178
Threads: 17
Joined: Jun 2012
Reputation: 7
#9
RE: FATAL ERROR

(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:
FATAL ERROR is: main (86.2) Unexpected end of file



EDIT: Sorry I didn't see an { Big Grin

CURRENTLY WORKING ON:
Final Light = 40%
Need of voice actors.
(This post was last modified: 08-02-2012, 10:04 AM by Steve.)
08-01-2012, 03:27 PM
Find
skatekai Offline
Junior Member

Posts: 15
Threads: 6
Joined: Jul 2012
Reputation: 0
#10
RE: FATAL ERROR

(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:
FATAL ERROR is: main (86.2) Unexpected end of file


you have an } too much in void CheckValue(string sEntity)
remove it

I can not delete CheckValue if the map does not work

some other solution?
08-01-2012, 03:36 PM
Find




Users browsing this thread: 2 Guest(s)