Hi, i am very new to scripting and when i try to open my level i get this error:
FATAL ERROR:could not load script file (points to my script)
main (16,8) : ERR : Expected ´(´
Can someone explain what is wrong?
void OnStart()
{
if(ScriptDebugOn())
{
GiveItemFromFile("lantern", "lantern.ent");
SetPlayerLampOil(100.0f);
for(int i = 0;i < 10;i++)
{
GiveItemFromFile("tinderbox", "tinderbox.ent");
}
{
AddUseItemCallback("", "key_tower_1", "mansion_1", "KeyOnDoor", true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "mansion_1", 0.0f, true);
}
}
}