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");
Function bodies (and pretty much everything else requires curly braces --> { }
For example,
Also,
PHP Code:
AddUseItemCallback("", "key_1", "door_1", "FUNCTION", true)
//This requires a semicolon
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.
(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)Bludsik Wrote: [ -> ] (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? 
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");
}