Auto-translated
Help, kind people, if there's anyone alive here!
Please help me write a simple script. I don't know why, but none of the options work.
Please don't tell me to "read the manual," I've read it many times, and one of the options is actually from there.
It's a simple action: when the main character touches an object (or, even better, enters a specific zone, but for now, even the object doesn't work), they should be teleported to a specific point.
The following scripts don't work:
```
function PobegF (heroname)
SetObjectPosition((heroname), 88, 102, floor -1);
end;
Trigger(OBJECT_TOUCH_TRIGGER, "Proba", "PobegF");
```
It says: attempt to perform arithmetic on a function value.
```
function PobegF (heroname)
SetObjectPosition(heroname, 88, 102, floor -1);
end;
Trigger(4, "Proba", "PobegF");
```
It says the same thing.
```
function PobegF ()
SetObjectPosition("Raelag", 88, 102, floor -1);
end;
Trigger(OBJECT_TOUCH_TRIGGER, "Proba", "PobegF");
```
Same problem.
```
function PobegF ()
SetObjectPosition("Raelag", 88, 102, floor);
end;
Trigger(OBJECT_TOUCH_TRIGGER, "Proba", "PobegF");
```
It says: Wrong type of argument 4, when calling function SetObjectPosition.
```
function PobegF ()
SetObjectPosition("Raelag", destination_151, 138, floor -1);
end;
Trigger(OBJECT_TOUCH_TRIGGER, "Proba", "PobegF");
```
It says: attempt to perform arithmetic on a function value.
```
function PobegF ()
SetObjectPosition("Raelag", destination_151, 138, floor);
end;
Trigger(OBJECT_TOUCH_TRIGGER, "Proba", "PobegF");
```
It says: Wrong type of argument 4, when calling function SetObjectPosition.
What's going on?