| 
		
	
		| Bludsik   Junior Member
 
 Posts: 3
 Threads: 1
 Joined: Jul 2013
 Reputation: 
0
 | 
			| hps file scripting errors *i need helpX|* 
 
				I was able to fix most of the errors myself, (first time coding   ) 
I'm really failing at this please someone help   
The error reads: FATAL ERROR: could not load script file (blah blah...) 
main(6,1):ERR: Expected ',' or ';' 
main(18,12):ERR: Expected identifier
Here is my current script in my .hps file... 
void OnStart 
( 
	AddUseItemCallback("", "key_1", "door_1", "FUNCTION", true) 
)
 
void OnEnter() 
(
 
)
 
void OnLeave() 
(
 
) 
void FUNCTION(string &in item, string &in door) 
( 
	SetSwingDoorLocked("door_1", false); 
	RemoveItem("key_1");
			 |  |  
	| 07-29-2013, 06:18 PM |  |  
	
		| Tomato Cat   Senior Member
 
 Posts: 287
 Threads: 2
 Joined: Sep 2012
 Reputation: 
20
 | 
			| RE: hps file scripting errors *i need helpX|* 
 
				Function bodies (and pretty much everything else requires curly braces --> { } 
For example,
 
Also,
 AddUseItemCallback("", "key_1", "door_1", "FUNCTION", true)//This requires a semicolon
 
 |  |  
	| 07-29-2013, 07:40 PM |  |  
	
		| The chaser   Posting Freak
 
 Posts: 2,486
 Threads: 76
 Joined: Jun 2012
 Reputation: 
113
 | 
			| RE: hps file scripting errors *i need helpX|* 
 
				void OnStart{
 AddUseItemCallback("", "key_1", "door_1", "FUNCTION", true);
 }
 
 void OnEnter()
 {
 
 }
 
 void OnLeave()
 {
 
 }
 void FUNCTION(string &in item, string &in asEntity)
 {
 SetSwingDoorLocked("door_1", false);
 RemoveItem("key_1");
 }
 
 There, fixed it for you. You had some things wrong:
 
 -You put these "(" instead "{"
 -You didn't have the FUNCTION function closed (with a })
 -You hadn't put a ; at the end of the AddUseItemCallback.
 
                               THE OTHERWORLD (WIP) ![[Image: k6vbdhu]](http://tinyurl.com/k6vbdhu)  
Aculy iz dolan. |  |  
	| 07-30-2013, 11:08 AM |  |  
	
		| Bludsik   Junior Member
 
 Posts: 3
 Threads: 1
 Joined: Jul 2013
 Reputation: 
0
 | 
			| RE: hps file scripting errors *i need helpX|* 
 
				 (07-30-2013, 11:08 AM)The chaser Wrote:  void OnStart{
 AddUseItemCallback("", "key_1", "door_1", "FUNCTION", true);
 }
 
 void OnEnter()
 {
 
 }
 
 void OnLeave()
 {
 
 }
 void FUNCTION(string &in item, string &in asEntity)
 {
 SetSwingDoorLocked("door_1", false);
 RemoveItem("key_1");
 }
 
 There, fixed it for you. You had some things wrong:
 
 -You put these "(" instead "{"
 -You didn't have the FUNCTION function closed (with a })
 -You hadn't put a ; at the end of the AddUseItemCallback.
 Thanks so much for replying. I fixed the errors, but now it comes up with an error saying  
main (17,1):ERR: No matching signatures to 'SetSwingDoorLocked(string@&, const bool)' 
Any suggestions?    |  |  
	| 07-30-2013, 10:17 PM |  |  
	
		| The chaser   Posting Freak
 
 Posts: 2,486
 Threads: 76
 Joined: Jun 2012
 Reputation: 
113
 | 
			| RE: hps file scripting errors *i need helpX|* 
 
				 (07-30-2013, 10:17 PM)Bludsik Wrote:   (07-30-2013, 11:08 AM)The chaser Wrote:  void OnStartThanks so much for replying. I fixed the errors, but now it comes up with an error saying{
 AddUseItemCallback("", "key_1", "door_1", "FUNCTION", true);
 }
 
 void OnEnter()
 {
 
 }
 
 void OnLeave()
 {
 
 }
 void FUNCTION(string &in item, string &in asEntity)
 {
 SetSwingDoorLocked("door_1", false);
 RemoveItem("key_1");
 }
 
 There, fixed it for you. You had some things wrong:
 
 -You put these "(" instead "{"
 -You didn't have the FUNCTION function closed (with a })
 -You hadn't put a ; at the end of the AddUseItemCallback.
 main (17,1):ERR: No matching signatures to 'SetSwingDoorLocked(string@&, const bool)'
 Any suggestions?
  
Sorry, I had a mistake D:
 
This should be ok:
 
void OnStart 
{ 
	AddUseItemCallback("", "key_1", "door_1", "FUNCTION", true); 
}
 
void OnEnter() 
{
 
}
 
void OnLeave() 
{
 
} 
void FUNCTION(string &in item, string &in asEntity) 
{ 
	SetSwingDoorLocked("door_1", false, false); 
	RemoveItem("key_1"); 
}
			 
                               THE OTHERWORLD (WIP) ![[Image: k6vbdhu]](http://tinyurl.com/k6vbdhu)  
Aculy iz dolan. |  |  
	| 07-30-2013, 11:14 PM |  |  
	
		| Bludsik   Junior Member
 
 Posts: 3
 Threads: 1
 Joined: Jul 2013
 Reputation: 
0
 | 
			| RE: hps file scripting errors *i need helpX|* 
 
				 (07-30-2013, 11:14 PM)The chaser Wrote:   (07-30-2013, 10:17 PM)Bludsik Wrote:   (07-30-2013, 11:08 AM)The chaser Wrote:  void OnStartThanks so much for replying. I fixed the errors, but now it comes up with an error saying{
 AddUseItemCallback("", "key_1", "door_1", "FUNCTION", true);
 }
 
 void OnEnter()
 {
 
 }
 
 void OnLeave()
 {
 
 }
 void FUNCTION(string &in item, string &in asEntity)
 {
 SetSwingDoorLocked("door_1", false);
 RemoveItem("key_1");
 }
 
 There, fixed it for you. You had some things wrong:
 
 -You put these "(" instead "{"
 -You didn't have the FUNCTION function closed (with a })
 -You hadn't put a ; at the end of the AddUseItemCallback.
 main (17,1):ERR: No matching signatures to 'SetSwingDoorLocked(string@&, const bool)'
 Any suggestions?
  Sorry, I had a mistake D:
 
 This should be ok:
 
 void OnStart
 {
 AddUseItemCallback("", "key_1", "door_1", "FUNCTION", true);
 }
 
 void OnEnter()
 {
 
 }
 
 void OnLeave()
 {
 
 }
 void FUNCTION(string &in item, string &in asEntity)
 {
 SetSwingDoorLocked("door_1", false, false);
 RemoveItem("key_1");
 }
 omfg It works    
Thank you so so much !    |  |  
	| 07-31-2013, 02:04 AM |  |  |