Frictional Games Forum (read-only)

Full Version: Unexpected end of file
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm having a slight problem. My script code in my .hps file is working perfect and the map works but when I add the following:

on void OnStart() i add AddEntityCollideCallback("CloseDoor", "Player", DoorClose", true, 1);

and then I add

void DoorClose(correct syntax)
{
SetSwingDoorClosed("mansion_2", true, false);
}


and for some reason I get unexpected end of line, why is this?
It's soppoused to be

void OnStart()
{
AddEntityCollideCallback("Player", "CloseDoor", "DoorClose", true, 1);
}


void DoorClose(correct syntax)
{
SetSwingDoorClosed("mansion_2", true, false);
}
AddEntityCollideCallback("CloseDoor", "Player", DoorClose", true, 1);
missing " at the start of the called function.