02-21-2013, 03:38 PM
I'm trying to get a door open itself when a player walks trough an area:
Script:
I copied everything from here, so that shouldn't be the problem.
But everytime I try to reload or enter the map, this happens:
main (6, 1) : INFO : Compiling void dooropen(string&in, string&in, int)
main (11, 18) : ERR : Expression must be of boolean type
I've tried everything but I just can't see the error... I used these commands on other maps and they always worked. Could someone help me out?
Script:
Code:
void OnStart()
{
AddEntityCollideCallback("Player", "Scriptarea_1", "dooropen", true, 0);
}
void dooropen(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorDisableAutoClose("mansion_1", true);
SetSwingDoorClosed("mansion_1", false, false);
for (int i = 0; i = 10; i++)
{
AddPropForce("mansion_1", 800, 0, 0, "world");
}
}
I copied everything from here, so that shouldn't be the problem.
But everytime I try to reload or enter the map, this happens:
main (6, 1) : INFO : Compiling void dooropen(string&in, string&in, int)
main (11, 18) : ERR : Expression must be of boolean type
I've tried everything but I just can't see the error... I used these commands on other maps and they always worked. Could someone help me out?