I've just copied the sample script from the wiki and added something to it as per instructional video but when I try to run the game after this alteration I get
Quote:(15,1) unexpected token "{"
error.
////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "TestKey_1", "castle_arched_no_grav01_1", "KeyOnDoor", true);
//Add the Lantern and 10 Tinderboxes when in Debug mode, always good to have light!
if(ScriptDebugOn())
{
GiveItemFromFile("lantern", "lantern.ent");
for(int i=0;i<10;i++) GiveItemFromFile("tinderbox_"+i, "tinderbox.ent");
}
}
void KeyOnDoor(string &in asItem, string &in asEntity);
{
SetSwingDoorLocked("castle_arched_no_grav01_1", false, true);
PlaySoundAtEntity("", "unlock_door", "castle_arched_no_grav01_1", 0, false);
RemoveItem("TestKey_1");
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
Dedicated to the butterfly.