Your main issue deals with syntax errors. In order to help you solve your own problems, you would have to learn how to properly define a function, how to properly declare variables, how to properly call a function, et cetera; pretty much, you'd have to learn a few things about programming. I'm not going to try to teach you everything (since there are better places to learn from than from me), but i'll mention a couple of things.
Variables
Think of a variable as a container for data. Each variable contains a specific type of data (search "data types"). A valid variable name consists of letters, which could also include either underscores (_) and numbers. When storing information in a variable, you must specify the type of data you're storying (again, see "data types").
Example:
int number = 0;
string text = "some text";
float number_2 = 2.0;
Functions
A function can be considered a group of statements that can be executed by calling the function. A function can be declared with or without parameters. Parameters are a comma-delimited list of expressions. An expression is basically a line of code to be executed (usually ending with a semicolon). Functions can also return a certain data type.
Example functions:
// Without parameters
void function_name()
{
// some code here...
}
// With parameters
int function_name(string &in name, int state)
{
// some code here...
return state;
}
Calling one of the example functions:
int state = function_name("object_1", 1);
function_name();
In any given script, there cannot be two functions with the same name with the same return type and with the same kind of parameters. This confuses the parser (or compiler) and will toss out an error.
The HPL2 engine (the engine of Amnesia) already has functions reserved for use. Overriding these functions will confuse the engine.
Try to figure out what you did wrong.