willsage 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 7 
	Threads: 2 
	Joined: Mar 2012
	
 Reputation: 
0
		
	 | 
	
		
			
Messed up TIMERS! 
			 
			
				I am making a custom story for a youtuber and I get this error: 
Quote:FATAL ERROR: Could not load script file 
'custom_stories/CZtrollmaps_v.01/maps/Menu.hps'! 
main (4, 3) : ERR : No matching signatures to 'AddTimer(string@&,  
string@&, string@&)' 
main (177, 3) : ERR : No matching signatures to 'AddTimer(string@&,  
string@&, string@&)' 
main (123, 3) : ERR : No matching signatures to 'AddTimer(string@&,  
string@&, string@&)' 
main (129, 3) : ERR : No matching signatures to 'AddTimer(string@&,  
string@&, string@&)' 
main (136, 3) : ERR : No matching signatures to 'AddTimer(string@&,  
string@&, string@&)'  
Here is my script... Menu.hps
 Quote:void OnStart() 
	{ 
FadeOut(0.05f); 
AddTimer("intro", "5.0f", "FadeIn1"); 
 
AddEntityCollideCallback("Door_TrollMaps", "TrollMapsTPScript", "TPTrollMaps", false, 0); 
AddEntityCollideCallback("Door_FanMadeMaps", "FanMadeMapsTPScript", "TPFanMadeMaps", false, 0); 
AddEntityCollideCallback("Door_ToMenu_1", "MenuTPScript_1", "TPMenu1", false, 0); 
AddEntityCollideCallback("Tp_ToMenu_door_2", "MenuTPScript_2", "TPMenu2", false, 0); 
AddEntityCollideCallback("Door_SurvivalMaps", "SurvivalMapsTPScript", "TPSurvivalMaps", false, 0); 
AddEntityCollideCallback("Door_Minigames", "MinigamesTPScript", "TPMinigames", false, 0); 
AddEntityCollideCallback("Door_ToMenu3", "MenuTPScript_3", "TPMenu3", false, 0); 
AddEntityCollideCallback("Door_ToMenu4", "MenuTPScript_4", "TPMenu4", false, 0); 
 
AddEntityCollideCallback("CollisionScript_1", "Player", "Stop1", true, 0); 
 
RotatePropToSpeed("elevator_machine_cog_main_1", 1.0f, 2.0f, 0.0f, 0.0f, -1.0f, true, ""); 
 
SetEntityCustomFocusCrossHair("ObjMapsTPScript", "LevelDoor"); 
 
SetFogActive(false); 
SetSanityDrainDisabled(false); 
ClearSavedMaps(); 
 
SetEntityPlayerInteractCallback("level_barricade_01", "Barricade01Load", false); 
SetEntityPlayerInteractCallback("castle_gate_arched01_2", "Open", true); 
SetEntityPlayerInteractCallback("ObjMapsTPScript", "TpM", false); 
 
	} 
	 
//////Teleportation Scripts 
/////////////////////////// 
void TPTrollMaps(string &in asParent, string &in asChild, int alState) //This teleports the player to the trolling maps lobby. 
	{ 
TeleportPlayer("PlayerStartArea_6"); 
SetPlayerMoveSpeedMul(2.5f); 
SetPlayerRunSpeedMul(0); 
	} 
	 
void TPSurvivalMaps(string &in asParent, string &in asChild, int alState) //This teleports the player to the survival maps lobby. 
	{ 
TeleportPlayer("PlayerStartArea_7"); 
	} 
	 
void TPMinigames(string &in asParent, string &in asChild, int alState) //This teleports the player to the minigames lobby. 
	{ 
TeleportPlayer("PlayerStartArea_8"); 
	} 
	 
void TpM (string &in asEntity) 
	{ 
TeleportPlayer("PlayerStartArea_13"); 
	} 
	 
void TPFanMadeMaps(string &in asParent, string &in asChild, int alState) //This teleports the player to the minigames lobby. 
	{ 
TeleportPlayer("PlayerStartArea_12"); 
	} 
	 
void TPMenu1(string &in asParent, string &in asChild, int alState) //This teleports the player to the main lobby. 
	{ 
TeleportPlayer("PlayerStartArea_5"); 
	} 
	 
void TPMenu2(string &in asParent, string &in asChild, int alState) //This teleports the player to the main lobby. 
	{ 
TeleportPlayer("PlayerStartArea_4"); 
	} 
	 
void TPMenu3(string &in asParent, string &in asChild, int alState) //This teleports the player to the main lobby. 
	{ 
TeleportPlayer("PlayerStartArea_3"); 
SetPlayerMoveSpeedMul(1); 
SetPlayerRunSpeedMul(1); 
	} 
	 
void TPMenu4(string &in asParent, string &in asChild, int alState) //This teleports the player to the main lobby. 
	{ 
TeleportPlayer("PlayerStartArea_3"); 
SetPlayerMoveSpeedMul(1); 
SetPlayerRunSpeedMul(1); 
	} 
	 
//////Loading Screens 
///////////////////// 
void Barricade01Load(string &in asEntity) 
	{ 
SetupLoadScreen("LoadingScreens", "Barricade01", 1, "BarricadeLoadingScreen.png"); 
	} 
	 
//////Interaction Callbacks 
/////////////////////////// 
void Open(string &in asEntity) 
	{ 
SetEntityActive("castle_gate_arched01_2", false); 
SetEntityActive("castle_gate_arched01_open_1", true); 
	} 
	 
//////Intro 
/////////// 
void TimerMoveForward(string &in asTimer) 
	{ 
MovePlayerForward(2); 
AddTimer("automove", 0, "TimerMoveForward"); 
	} 
 
void TimerCollapseWall(string &in asTimer) 
	{ 
StopSound("rumble", 4.0f); 
PlaySoundAtEntity("rumble", "explosion_rock_large.snt", "Player", 3.0f, false); 
CreateParticleSystemAtEntity("ps_dust_impact", "ps_dust_impact.ps", "rumble", false); 
	} 
	 
void FadeIn1(string &in asTimer) 
	{ 
FadeIn(4.5f); 
AddTimer("intro", "5.0f", "FadeOut1"); 
	} 
	 
void FadeOut1(string &in asTimer) 
	{ 
FadeOut(2.5f); 
AddTimer("intro", "5.0f", "FadeIn2"); 
	} 
	 
void FadeIn2(string &in asTimer) 
	{ 
FadeIn(4.5f); 
AddTimer("intro", "6.0f", "LookScript1"); 
TeleportPlayer("PlayerStartArea_15"); 
StartPlayerLookAt("LookScript_1", 3.5f, 6.5f, ""); 
	} 
	 
void LookScript1(string &in asTimer) 
	{ 
AddTimer("intro", "5.0f", "LookScript2"); 
AddTimer("automove", 0, "TimerMoveForward"); 
StopPlayerLookAt(); 
StartPlayerLookAt("rumble", 3.5f, 6.5f, ""); 
	} 
	 
void LookScript2(string &in asTimer) 
	{ 
AddTimer("automove", 0, "TimerMoveForward"); 
StopPlayerLookAt(); 
StartPlayerLookAt("rumble", 3.5f, 6.5f, ""); 
	} 
	 
void Stop1(string &in asParent, string &in asChild, int alState) //This teleports the player to the main lobby. 
	{ 
RemoveTimer("automove"); 
AddTimer("Escape", 2, "TimerCollapseWall");	 
StartScreenShake(0.03f, 3.0f, 1.0f, 2.0f); 
PlaySoundAtEntity("rumble", "general_rock_rumble_no3d.snt", "Player", 2.0f, false); 
	}  
PLEASE HELP!!
			  
			
			
			
		 |  
	 
 | 
 
	| 04-02-2012, 11:34 PM  | 
	
		
	 | 
 
 
	
		
		Xanthos 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 318 
	Threads: 9 
	Joined: Mar 2012
	
 Reputation: 
8
		
	 | 
	
		
			
RE: Messed up TIMERS! 
			 
			
				Er, I can't help you I use my timers like so... 
--- 
 
	void Lights(string &in asParent, string &in asChild, int alState) 
{ 
 
	StartPlayerLookAt("AreaLook01", 10, 100, ""); 
	AddTimer("1", 3, "IntroTimer"); 
	AddTimer("2", 4.5f, "IntroTimer"); 
} 
 
void IntroTimer(string &in asTimer) 
{ 
	if(asTimer == "1"){ 
 PlayGuiSound("player_cough.snt", 0.7f); 
 StopPlayerLookAt(); 
	} 
	else if(asTimer == "2"){ 
 FadePlayerRollTo(85, 1, 1);  
	} 
 
}
			 
			
			
 
			
		 |  
	 
 | 
 
	| 04-02-2012, 11:40 PM  | 
	
		
	 | 
 
 
	
		
		Your Computer 
 
 
		
			SCAN ME! 
			
			
			
 
			
	Posts: 3,456 
	Threads: 32 
	Joined: Jul 2011
	
 Reputation: 
235
		
	 | 
	
		
			
RE: Messed up TIMERS! 
			 
			
				Strings aren't floats.
			 
			
			
 
			
		 |  
	 
 | 
 
	| 04-02-2012, 11:53 PM  | 
	
		
	 | 
 
 
	
		
		willsage 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 7 
	Threads: 2 
	Joined: Mar 2012
	
 Reputation: 
0
		
	 | 
	
		
			
RE: Messed up TIMERS! 
			 
			
				 (04-02-2012, 11:53 PM)Your Computer Wrote:  Strings aren't floats. Your saying I should use a ... float? I don't get it; an example please! :D 
			  
			
			
			
		 |  
	 
 | 
 
	| 04-03-2012, 12:20 AM  | 
	
		
	 | 
 
 
	
		
		Your Computer 
 
 
		
			SCAN ME! 
			
			
			
 
			
	Posts: 3,456 
	Threads: 32 
	Joined: Jul 2011
	
 Reputation: 
235
		
	 | 
	
		
			
RE: Messed up TIMERS! 
			 
			
				 (04-03-2012, 12:20 AM)willsage Wrote:  Your saying I should use a ... float? I don't get it; an example please!   
How to properly use the AddTimer function is shown in post #2.
			  
			
			
 
			
		 |  
	 
 | 
 
	| 04-03-2012, 01:16 AM  | 
	
		
	 | 
 
 
	
		
		Obliviator27 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 792 
	Threads: 10 
	Joined: Jul 2011
	
 Reputation: 
66
		
	 | 
	
		
			
RE: Messed up TIMERS! 
			 
			
				The error message is telling you what's wrong. 
 
No matching signatures to 'AddTimer(string@&, 
string@&, string@&)' 
 
This doesn't exist. AddTimer(string, string, string) isn't a function. However 
 
AddTimer(string, float, string) is. 
Basically your second parameter has to be a number. AKA, the how many seconds until the timer calls the function. 
			 
			
			
 
			
		 |  
	 
 | 
 
	| 04-03-2012, 05:33 AM  | 
	
		
	 | 
 
 
	
		
		willsage 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 7 
	Threads: 2 
	Joined: Mar 2012
	
 Reputation: 
0
		
	 | 
	
		
			
RE: Messed up TIMERS! 
			 
			
				oHWOW THANK YOU! I feel so stupid after nearly a year of map making I make a mistake like this and yet I make amnesia rooms like a pro! Thankyou all of you +1 rep for all!
			 
			
			
			
		 |  
	 
 | 
 
	| 04-03-2012, 09:04 PM  | 
	
		
	 | 
 
 
	 
 |