Radical Batz
Posting Freak
Posts: 953
Threads: 145
Joined: Dec 2013
Reputation:
25
|
1 error which I can't solve/find?!
So this is the error that my custom story gets me everytime I load it
FATAL ERROR: Could not load script file 'custom_stories/Lifeless_The Abandon/maps/Lifeless_The Abandon.hps'!
main (78, 2) : ERR : Unexpected end of file
so here is the script file/code/hps file
void OnStart()
{
wakeUp();
}
void wakeUp() {
FadeOut(0); // Instantly fades the screen out. (Good for starting the game)
FadeIn(10); // Amount of seconds the fade in takes
FadeImageTrailTo(2, 2);
FadeSepiaColorTo(0, 2);
SetPlayerActive(false);
FadePlayerRollTo(50, 220, 220); // "Tilts" the players head
FadeRadialBlurTo(0.5, 2);
SetPlayerCrouching(true); // Simulates being on the ground
PlayMusic("18_amb.ogg", true, 1, 4, 1, true);
AddEntityCollideCallback("Player", "AreaCollide", "EventCollide", true, 1);
AddTimer("trig1", 11.0f, "beginStory"); // Change '11.0f' to however long you want the 'unconciousness' to last
}
void beginStory(string &in asTimer) {
ChangePlayerStateToNormal();
SetPlayerActive(true);
FadePlayerRollTo(0, 33, 33); // Change all settings to defaults
FadeRadialBlurTo(0.0, 1);
FadeSepiaColorTo(0, 4);
SetPlayerCrouching(false);
FadeImageTrailTo(0,1);
SetPlayerLampOil(29);
GiveSanityDamage(80, false);
GivePlayerDamage(30 , "false" , false, false);
SetPlayerMoveSpeedMul(0.56f);
SetPlayerRunSpeedMul(0);
//SetPlayerLookSpeedMul(0.5);
AddUseItemCallback("", "HollowNeedle", "CellDoor", "UseHollowNeedleOnDoor", true);
}
void UseHollowNeedleOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("CellDoor", false, true);
PlaySoundAtEntity("", "unlock_door.ogg", asEntity, 0, false);
RemoveItem(asItem);
}
void EventCollide(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("CellGuardGrunt", true);
AddEnemyPatrolNode("CellGuardGrunt", "Node_1",0.001f, "");
AddEnemyPatrolNode("CellGuardGrunt", "Node_4",0.001f, "");
AddEnemyPatrolNode("CellGuardGrunt", "Node_6",0.001f, "");
AddEnemyPatrolNode("CellGuardGrunt", "Node_10",0.001f, "");
AddEnemyPatrolNode("CellGuardGrunt", "Node_15",0.001f, "");
AddEnemyPatrolNode("CellGuardGrunt", "Node_18",0.001f, "");
}
void Puzzle (string &in asEntity, int LeverState
{
if(GetLeverState("Lever1") == -1
&& GetLeverState("Lever2" ) == 1)
&& GetLeverState("Lever3" ) == -1
&& GetLeverState("Lever4" ) == -1
{
void UnlockDoor(string &in asEntity, int LeverState)
}
{ SetSwingDoorLocked("Door", false, true);
PlaySoundAtEntity("", "door_safety_open.ogg", "Door", 0, false);
}
I'm trying to make a door unlock after doing a lever puzzle
(This post was last modified: 01-24-2014, 08:21 PM by Radical Batz.)
|
|
01-24-2014, 08:20 PM |
|
ingedoom
Member
Posts: 120
Threads: 12
Joined: Feb 2012
Reputation:
0
|
RE: 1 error which I can't solve/find?!
Could this be it? Seems like you misplaced your parenthesis.
if(GetLeverState("Lever1") == -1
&& GetLeverState("Lever2" ) == 1)
&& GetLeverState("Lever3" ) == -1
&& GetLeverState("Lever4" ) == -1
edit: also the puzzle function does not seem to have a closing bracket.
edit:
void Puzzle (string &in asEntity, int LeverState)
{
if(GetLeverState("Lever1") == -1
&& GetLeverState("Lever2" ) == 1
&& GetLeverState("Lever3" ) == -1
&& GetLeverState("Lever4" ) == -1)
{
UnlockDoor(string &in asEntity, int LeverState);
}
else
{ SetSwingDoorLocked("Door", false, true);
PlaySoundAtEntity("", "door_safety_open.ogg", "Door", 0, false);
}
}
I think that should do it.
(This post was last modified: 01-24-2014, 08:49 PM by ingedoom.)
|
|
01-24-2014, 08:39 PM |
|
Radical Batz
Posting Freak
Posts: 953
Threads: 145
Joined: Dec 2013
Reputation:
25
|
RE: 1 error which I can't solve/find?!
(01-24-2014, 08:39 PM)ingedoom Wrote: Could this be it? Seems like you misplaced your parenthesis.
if(GetLeverState("Lever1") == -1
&& GetLeverState("Lever2" ) == 1)
&& GetLeverState("Lever3" ) == -1
&& GetLeverState("Lever4" ) == -1
edit: also the puzzle function does not seem to have a closing bracket.
Ok I did that and made a closing bracket int he puzzle but it still doesn't work! it gets me this error instead of another line
FATAL ERROR: Could not load script file 'custom_stories/Lifeless_The Abandon/maps/Lifeless_The Abandon.hps'!
main (79, 2) : ERR : Unexpected end of file
|
|
01-24-2014, 08:44 PM |
|
ingedoom
Member
Posts: 120
Threads: 12
Joined: Feb 2012
Reputation:
0
|
RE: 1 error which I can't solve/find?!
Did you make another "}" at the buttom?
|
|
01-24-2014, 08:47 PM |
|
Radical Batz
Posting Freak
Posts: 953
Threads: 145
Joined: Dec 2013
Reputation:
25
|
RE: 1 error which I can't solve/find?!
(01-24-2014, 08:47 PM)ingedoom Wrote: Did you make another "}" at the buttom?
no, I did not.
|
|
01-24-2014, 08:51 PM |
|
ingedoom
Member
Posts: 120
Threads: 12
Joined: Feb 2012
Reputation:
0
|
RE: 1 error which I can't solve/find?!
But you should =) And also fix the other syntax errors above. Is it resolved?
(This post was last modified: 01-24-2014, 09:12 PM by ingedoom.)
|
|
01-24-2014, 09:12 PM |
|
Radical Batz
Posting Freak
Posts: 953
Threads: 145
Joined: Dec 2013
Reputation:
25
|
RE: 1 error which I can't solve/find?!
(01-24-2014, 09:12 PM)ingedoom Wrote: But you should =) And also fix the other syntax errors above. Is it resolved?
nope still gets me the error, here is the code again
void OnStart()
{
wakeUp();
}
void wakeUp() {
FadeOut(0); // Instantly fades the screen out. (Good for starting the game)
FadeIn(10); // Amount of seconds the fade in takes
FadeImageTrailTo(2, 2);
FadeSepiaColorTo(0, 2);
SetPlayerActive(false);
FadePlayerRollTo(50, 220, 220); // "Tilts" the players head
FadeRadialBlurTo(0.5, 2);
SetPlayerCrouching(true); // Simulates being on the ground
PlayMusic("18_amb.ogg", true, 1, 4, 1, true);
AddEntityCollideCallback("Player", "AreaCollide", "EventCollide", true, 1);
AddTimer("trig1", 11.0f, "beginStory"); // Change '11.0f' to however long you want the 'unconciousness' to last
}
void beginStory(string &in asTimer) {
ChangePlayerStateToNormal();
SetPlayerActive(true);
FadePlayerRollTo(0, 33, 33); // Change all settings to defaults
FadeRadialBlurTo(0.0, 1);
FadeSepiaColorTo(0, 4);
SetPlayerCrouching(false);
FadeImageTrailTo(0,1);
SetPlayerLampOil(29);
GiveSanityDamage(80, false);
GivePlayerDamage(30 , "false" , false, false);
SetPlayerMoveSpeedMul(0.56f);
SetPlayerRunSpeedMul(0);
//SetPlayerLookSpeedMul(0.5);
AddUseItemCallback("", "HollowNeedle", "CellDoor", "UseHollowNeedleOnDoor", true);
}
void UseHollowNeedleOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("CellDoor", false, true);
PlaySoundAtEntity("", "unlock_door.ogg", asEntity, 0, false);
RemoveItem(asItem);
}
void EventCollide(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("CellGuardGrunt", true);
AddEnemyPatrolNode("CellGuardGrunt", "Node_1",0.001f, "");
AddEnemyPatrolNode("CellGuardGrunt", "Node_4",0.001f, "");
AddEnemyPatrolNode("CellGuardGrunt", "Node_6",0.001f, "");
AddEnemyPatrolNode("CellGuardGrunt", "Node_10",0.001f, "");
AddEnemyPatrolNode("CellGuardGrunt", "Node_15",0.001f, "");
AddEnemyPatrolNode("CellGuardGrunt", "Node_18",0.001f, "");
}
void Puzzle (string &in asEntity, int LeverState
{
if(GetLeverState("Lever1") == -1
&& GetLeverState("Lever2" ) == 1)
&& GetLeverState("Lever3" ) == -1
&& GetLeverState("Lever4" ) == -1
}
{
void UnlockDoor(string &in asEntity, int LeverState)
SetSwingDoorLocked("Door", false, true);
PlaySoundAtEntity("", "door_safety_open.ogg", "Door", 0, false);
}
|
|
01-24-2014, 09:13 PM |
|
FlawlessHappiness
Posting Freak
Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation:
171
|
RE: 1 error which I can't solve/find?!
Are you sure you updated your script?
void Puzzle (string &in asEntity, int LeverState
{
if(GetLeverState("Lever1") == -1
&& GetLeverState("Lever2" ) == 1)
&& GetLeverState("Lever3" ) == -1
&& GetLeverState("Lever4" ) == -1
}
Also this:
void UnlockDoor(string &in asEntity, int LeverState)
SetSwingDoorLocked("Door", false, true);
PlaySoundAtEntity("", "door_safety_open.ogg", "Door", 0, false);
}
This is the end of your script... You're missing brackets { }
Trying is the first step to success.
|
|
01-24-2014, 10:35 PM |
|
Romulator
Not Tech Support ;-)
Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation:
195
|
RE: 1 error which I can't solve/find?!
(01-24-2014, 10:35 PM)FlawlessHair Wrote: void Puzzle (string &in asEntity, int LeverState
{
if(GetLeverState("Lever1") == -1
&& GetLeverState("Lever2" ) == 1)
&& GetLeverState("Lever3" ) == -1
&& GetLeverState("Lever4" ) == -1
}
Also missing a ) after the void's syntax.
Discord: Romulator#0001
|
|
01-24-2014, 10:42 PM |
|
Radical Batz
Posting Freak
Posts: 953
Threads: 145
Joined: Dec 2013
Reputation:
25
|
RE: 1 error which I can't solve/find?!
(01-24-2014, 10:42 PM)Romulator Wrote: (01-24-2014, 10:35 PM)FlawlessHair Wrote: void Puzzle (string &in asEntity, int LeverState
{
if(GetLeverState("Lever1") == -1
&& GetLeverState("Lever2" ) == 1)
&& GetLeverState("Lever3" ) == -1
&& GetLeverState("Lever4" ) == -1
}
Also missing a ) after the void's syntax.
I'm getting another error I'm not sure why! the code looks fine to me now but the game doesn't agree
void Puzzle (string &in asEntity, int LeverState)
{
if(GetLeverState("Lever1") == -1
&& GetLeverState("Lever2" ) == 1)
&& GetLeverState("Lever3" ) == -1
&& GetLeverState("Lever4" ) == -1
}
{ void UnlockDoor(string &in asEntity, int LeverState)
SetSwingDoorLocked("Door", false, true);
PlaySoundAtEntity("", "door_safety_open.ogg", "Door", 0, false);
}
(This post was last modified: 01-24-2014, 11:16 PM by Radical Batz.)
|
|
01-24-2014, 11:15 PM |
|
|