Radical Batz 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 953 
	Threads: 145 
	Joined: Dec 2013
	
 Reputation: 
25
		
	 | 
	
		
			
Custom story error that I can't solve!? 
			 
			
				Every time I load my customs story it gets me this error message 
FATAL ERROR: Could not load script file 'custom_stories/Lifeless_The Abandon/maps/Lifeless_The Abandon.hps'! 
 main (57, 1) : ERR  : Unexpected token '{'
 
Now I know that when it says   Unexpected token '{' means that i am missing that character somewhere in my code. Now here is my code script
 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(45); 
GiveSanityDamage(80, false); 
GivePlayerDamage(30 , "false" , false, false); 
SetPlayerMoveSpeedMul(0.58f); 
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); 
GiveSanityBoostSmall(); 
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 AddEntityCollideCallback("Handle", "AreaConnect", "AttachLever", true, 1); 
} 
 
void AttachLever(string &in asParent, string &in asChild, int alState) 
{ 
    SetEntityActive("Lever", true); 
 
    SetEntityActive(asParent, false); 
    SetEntityActive("Mount", false); 
 
} 
 
void UnlockDoor(string &in asEntity, int LeverState) 
{ 
    if(LeverState == 1) { 
        SetSwingDoorLocked("Open", false, true); 
        GiveSanityBoostSmall(); 
        PlaySoundAtEntity("", "unlock_door.ogg", "Open", 0, false); 
        SetLeverStckState(asEntity, LeverState, bool abEffects); 
    } 
}
  
Now I've looked everywhere and I don't understand why i have that missing character because my code looks fine, help pls, tell me what I should do
			  
			
			
			
		 |  
	 
 | 
 
	| 01-30-2014, 09:16 PM  | 
	
		
	 | 
 
 
	
		
		daortir 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 422 
	Threads: 9 
	Joined: Sep 2013
	
 Reputation: 
18
		
	 | 
	
		
			
RE: Custom story error that I can't solve!? 
			 
			
				{ 
 
    void AddEntityCollideCallback("Handle", "AreaConnect", "AttachLever", true, 1); 
} 
 
Is the problem ^^. It shouldn't be written between " { " and shouldn't have a void before. Also it'd fit better in void OnStart I think ^^.
			 
			
			
 
			
		 |  
	 
 | 
 
	| 01-30-2014, 09:26 PM  | 
	
		
	 | 
 
 
	
		
		DnALANGE 
 
 
		
			Banned 
			
			
			
 
			
	Posts: 1,549 
	Threads: 73 
	Joined: Jan 2012
	
		
	 | 
	
		
			
RE: Custom story error that I can't solve!? 
			 
			
				As Daortir said earlyer ; 
Just to make it a little easyer, here is how it should look like :
 Quote:void AddEntityCollideCallback("Handle", "AreaConnect", "AttachLever", true, 1); 
{ 
} 
--- 
BUT you might use it here :
 Quote:void OnStart() 
{ 
AddEntityCollideCallback("Handle", "AreaConnect", "AttachLever", true, 1); 
} 
			 
			
			
			
				
(This post was last modified: 01-31-2014, 03:02 AM by DnALANGE.)
 
				
			 
		 |  
	 
 | 
 
	| 01-31-2014, 02:58 AM  | 
	
		
	 | 
 
 
	
		
		ingedoom 
 
 
		
			Member 
			
			
			
 
			
	Posts: 120 
	Threads: 12 
	Joined: Feb 2012
	
 Reputation: 
0
		
	 | 
	
		
			
RE: Custom story error that I can't solve!? 
			 
			
				This is a good read if you wanna learn how to code properly. 
Good read.
			 
			
			
 
			
		 |  
	 
 | 
 
	| 01-31-2014, 08:23 AM  | 
	
		
	 | 
 
 
	
		
		Radical Batz 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 953 
	Threads: 145 
	Joined: Dec 2013
	
 Reputation: 
25
		
	 | 
	
		
			
RE: Custom story error that I can't solve!? 
			 
			
				It gets me this error instead 
FATAL ERROR: Could not load script file 'custom_stories/Lifeless_The Abandon/maps/Lifeless_The Abandon.hps'! 
 main (7, 1) : ERR  : Unexpected token '{'
 
here's the updated script
 void OnStart() 
 
{ 
AddEntityCollideCallback("Handle", "AreaConnect", "AttachLever", true, 1); 
} 
 
{ 
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(45); 
GiveSanityDamage(80, false); 
GivePlayerDamage(30 , "false" , false, false); 
SetPlayerMoveSpeedMul(0.58f); 
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); 
GiveSanityBoostSmall(); 
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 AttachLever(string &in asParent, string &in asChild, int alState) 
{ 
    SetEntityActive("Lever", true); 
 
    SetEntityActive(asParent, false); 
    SetEntityActive("Mount", false); 
 
} 
 
void UnlockDoor(string &in asEntity, int LeverState) 
{ 
    if(LeverState == 1) { 
        SetSwingDoorLocked("Open", false, true); 
        GiveSanityBoostSmall(); 
        PlaySoundAtEntity("", "unlock_door.ogg", "Open", 0, false); 
        SetLeverStckState(asEntity, LeverState, bool abEffects); 
    } 
}
  
			 
			
			
			
				
(This post was last modified: 01-31-2014, 03:05 PM by Radical Batz.)
 
				
			 
		 |  
	 
 | 
 
	| 01-31-2014, 03:02 PM  | 
	
		
	 | 
 
 
	
		
		DnALANGE 
 
 
		
			Banned 
			
			
			
 
			
	Posts: 1,549 
	Threads: 73 
	Joined: Jan 2012
	
		
	 | 
	
		
			
RE: Custom story error that I can't solve!? 
			 
			
				{ 
 wakeUp(); 
 }
 
There is no function there? 
void ??? HERE must be a function like :
 Quote:void monsterwalky(string &in asItem, string &in asEntity) // or whatever you want. 
{ 
 wakeUp(); 
 } 
Remove the  Quote:{ 
 wakeUp(); 
 } 
 and just place  : wakeUp();  in OnStart()
			  
			
			
			
				
(This post was last modified: 01-31-2014, 03:10 PM by DnALANGE.)
 
				
			 
		 |  
	 
 | 
 
	| 01-31-2014, 03:09 PM  | 
	
		
	 | 
 
 
	
		
		Radical Batz 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 953 
	Threads: 145 
	Joined: Dec 2013
	
 Reputation: 
25
		
	 | 
	
		
			
RE: Custom story error that I can't solve!? 
			 
			
				like this? 
void OnStart() 
 
{ 
AddEntityCollideCallback("Handle", "AreaConnect", "AttachLever", true, 1); 
} 
 
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(45); 
GiveSanityDamage(80, false); 
GivePlayerDamage(30 , "false" , false, false); 
SetPlayerMoveSpeedMul(0.58f); 
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); 
GiveSanityBoostSmall(); 
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 AttachLever(string &in asParent, string &in asChild, int alState) 
{ 
    SetEntityActive("Lever", true); 
 
    SetEntityActive(asParent, false); 
    SetEntityActive("Mount", false); 
 
} 
 
void UnlockDoor(string &in asEntity, int LeverState) 
{ 
    if(LeverState == 1) { 
        SetSwingDoorLocked("Open", false, true); 
        GiveSanityBoostSmall(); 
        PlaySoundAtEntity("", "unlock_door.ogg", "Open", 0, false); 
        SetLeverStckState(asEntity, LeverState, bool abEffects); 
    } 
}
 
well the error says
 
FATAL ERROR: Could not load script file 'custom_stories/Lifeless_The Abandon/maps/Lifeless_The Abandon.hps'! 
 main (7, 7) : ERR  : Expected identifier
			  
			
			
			
				
(This post was last modified: 01-31-2014, 03:36 PM by Radical Batz.)
 
				
			 
		 |  
	 
 | 
 
	| 01-31-2014, 03:35 PM  | 
	
		
	 | 
 
 
	
		
		PutraenusAlivius 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 4,713 
	Threads: 75 
	Joined: Dec 2012
	
 Reputation: 
119
		
	 | 
	
		
			
RE: Custom story error that I can't solve!? 
			 
			
				void OnStart() { AddEntityCollideCallback("Handle", "AreaConnect", "AttachLever", true, 1); 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(45); GiveSanityDamage(80, false); GivePlayerDamage(30 , "false" , false, false); SetPlayerMoveSpeedMul(0.58f); 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); GiveSanityBoostSmall(); 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 AttachLever(string &in asParent, string &in asChild, int alState) {     SetEntityActive("Lever", true);
      SetEntityActive(asParent, false);     SetEntityActive("Mount", false);
  }
  void UnlockDoor(string &in asEntity, int LeverState) {     if(LeverState == 1)      {         SetSwingDoorLocked("Open", false, true);         GiveSanityBoostSmall();         PlaySoundAtEntity("", "unlock_door.ogg", "Open", 0, false);         SetLeverStckState(asEntity, LeverState, bool abEffects);     } } 
 
  
			 
			
			
 
"Veni, vidi, vici." 
"I came, I saw, I conquered." 
			
		 |  
	 
 | 
 
	| 01-31-2014, 03:38 PM  | 
	
		
	 | 
 
 
	
		
		Radical Batz 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 953 
	Threads: 145 
	Joined: Dec 2013
	
 Reputation: 
25
		
	 | 
	
		
			
RE: Custom story error that I can't solve!? 
			 
			
				thank you , but it gets this error now  
 
FATAL ERROR: Could not load script file 'custom_stories/Lifeless_The Abandon/maps/Lifeless_The Abandon.hps'! 
 main (76, 54) : ERR  : Expected '('
			 
			
			
			
				
(This post was last modified: 01-31-2014, 06:40 PM by Radical Batz.)
 
				
			 
		 |  
	 
 | 
 
	| 01-31-2014, 04:03 PM  | 
	
		
	 | 
 
 
	
		
		Romulator 
 
 
		
			Not Tech Support ;-) 
			
			
			
 
			
	Posts: 3,628 
	Threads: 63 
	Joined: Jan 2013
	
 Reputation: 
195
		
	 | 
	
		
			
RE: Custom story error that I can't solve!? 
			 
			
				Whenever you get errors, could you post your whole script with that error? It's hard to tell unless we know exactly where you are at..?
			 
			
			
 
Discord: Romulator#0001
![[Image: 3f6f01a904.png]](https://puu.sh/zOxJg/3f6f01a904.png)  
			
		 |  
	 
 | 
 
	| 01-31-2014, 10:45 PM  | 
	
		
	 | 
 
 
	 
 |