Frictional Games Forum (read-only)
Unexpected err { - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Unexpected err { (/thread-22147.html)

Pages: 1 2 3


RE: Unexpected err { - mrjoshy12 - 07-16-2013

(07-16-2013, 11:09 AM)No Author Wrote: The adduseitemcallback script on Lolkey_1 to loldoor_1 doesn't have a void before the "{"
Edit : I meant lol_key1 and lol_door1
i havent really learnt voids yet, i learnt most of it by a vid
but now its got very confusing


RE: Unexpected err { - PutraenusAlivius - 07-16-2013

(07-16-2013, 11:05 AM)mrjoshy12 Wrote: wow all these comments, i actually forgot to say i started doing this scripting yesterday,
so yeah i dont actually get what most of you are sayin

Just use the code.


RE: Unexpected err { - mrjoshy12 - 07-16-2013

(07-16-2013, 11:20 AM)JustAnotherPlayer Wrote:
(07-16-2013, 11:05 AM)mrjoshy12 Wrote: wow all these comments, i actually forgot to say i started doing this scripting yesterday,
so yeah i dont actually get what most of you are sayin

Just use the code.
it didnt work
(16, 1)
(21, 6) was the problem


RE: Unexpected err { - PutraenusAlivius - 07-16-2013

Code:
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked("escape_room_door1", false, true);
     PlaySoundAtEntity("", "unlock_door", "escape_room_door1", 0, false);
     RemoveItem("escape_door_key1");
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked("lol_door1", false, true);
     PlaySoundAtEntity("", "unlock_door", "lol_door1", 0, false);
     RemoveItem("lol_key1");
     PlayMusic("Without_You_.ogg", false, 1, 0, true);
}

Both functions have the same name.


RE: Unexpected err { - mrjoshy12 - 07-16-2013

(07-16-2013, 11:24 AM)JustAnotherPlayer Wrote:
Code:
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked("escape_room_door1", false, true);
     PlaySoundAtEntity("", "unlock_door", "escape_room_door1", 0, false);
     RemoveItem("escape_door_key1");
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked("lol_door1", false, true);
     PlaySoundAtEntity("", "unlock_door", "lol_door1", 0, false);
     RemoveItem("lol_key1");
     PlayMusic("Without_You_.ogg", false, 1, 0, true);
}

Both functions have the same name.
oh, well thanks i'll try it

(07-16-2013, 11:24 AM)JustAnotherPlayer Wrote:
Code:
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked("escape_room_door1", false, true);
     PlaySoundAtEntity("", "unlock_door", "escape_room_door1", 0, false);
     RemoveItem("escape_door_key1");
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked("lol_door1", false, true);
     PlaySoundAtEntity("", "unlock_door", "lol_door1", 0, false);
     RemoveItem("lol_key1");
     PlayMusic("Without_You_.ogg", false, 1, 0, true);
}

Both functions have the same name.
ok once i used it errors came up so i will stick with ma old one


RE: Unexpected err { - No Author - 07-16-2013

The same error again ?


RE: Unexpected err { - mrjoshy12 - 07-16-2013

(07-16-2013, 11:38 AM)No Author Wrote: The same error again ?
yup, i just dont get it, i only know how to script the one item and nothing else, i need it more simplified oh and i just dont get voids, i found it on videos


RE: Unexpected err { - No Author - 07-16-2013

JustAnotherPlayer didn't change the script he gave, just so you know. You used "UseKeyOnDoor" script twice. That caused the error. You need to change it. And do some edit at the void OnStart.

And post the changed script and the error you got.


RE: Unexpected err { - The chaser - 07-16-2013

Code:
////////////////////////////

// This runs when the player enters the map

void OnEnter()

{

     AddUseItemCallback("", "escape_door_key1", "escape_room_door1", "UsedKeyOnDoor", true);
AddUseItemCallback("", "lol_key1", "lol_door1", "UsedKeyOnDoor2", true);

}



void UsedKeyOnDoor(string &in asItem, string &in asEntity)

{

     SetSwingDoorLocked("escape_room_door1", false, true);

     PlaySoundAtEntity("", "unlock_door.snt", "escape_room_door1", 0, false);

     RemoveItem("escape_door_key1");

}



void UsedKeyOnDoor2(string &in asItem, string &in asEntity)

{

     SetSwingDoorLocked("lol_door1", false, true);

     PlaySoundAtEntity("", "unlock_door.snt", "lol_door1", 0, false);

     RemoveItem("lol_key1");

     PlayMusic("Without_You_.ogg", false, 1, 0, true);

}

//===========================================

// This runs when the player leaves the map

void OnLeave()

{

}

Does it cost much to simply fix the script? Here you have, this should be ok, without errors.


RE: Unexpected err { - No Author - 07-16-2013

(07-16-2013, 11:47 AM)The chaser Wrote: Does it cost much to simply fix the script?

Yes with my sucky phone that always stop working every 5 minutes