Frictional Games Forum (read-only)
Script Problems - 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: Script Problems (/thread-20613.html)

Pages: 1 2 3 4 5 6 7 8 9


RE: Script Problems - PutraenusAlivius - 03-06-2013

(03-06-2013, 03:47 PM)Coolfromdah00d Wrote:
(03-05-2013, 10:19 PM)darksky Wrote: what's the exact error message?

unexpected token {
Full script and at what line?


RE: Script Problems - Tiero - 03-06-2013

(03-06-2013, 03:47 PM)Coolfromdah00d Wrote:
(03-05-2013, 10:19 PM)darksky Wrote: what's the exact error message?

unexpected token {

{
SetEntityCallbackFunc("GuestRoomKey", "jump");
}

void jump(string &in asEntity, string &in type) <---- wheres body

{
SetEntityActive("corpse01", true);
PlaySoundAtEntity("", "21_screams.snt", "corpse01", 0, false);
}


RE: Script Problems - Coolfromdah00d - 03-06-2013

(03-06-2013, 04:14 PM)Tiero Wrote:
(03-06-2013, 03:47 PM)Coolfromdah00d Wrote:
(03-05-2013, 10:19 PM)darksky Wrote: what's the exact error message?

unexpected token {

{
SetEntityCallbackFunc("GuestRoomKey", "jump");
}

void jump(string &in asEntity, string &in type) <---- wheres body

{
SetEntityActive("corpse01", true);
PlaySoundAtEntity("", "21_screams.snt", "corpse01", 0, false);
}
where do I write the body= can you give me the full script


RE: Script Problems - Tiero - 03-06-2013

(03-06-2013, 04:55 PM)Coolfromdah00d Wrote:
(03-06-2013, 04:14 PM)Tiero Wrote:
(03-06-2013, 03:47 PM)Coolfromdah00d Wrote:
(03-05-2013, 10:19 PM)darksky Wrote: what's the exact error message?

unexpected token {

{
SetEntityCallbackFunc("GuestRoomKey", "jump");
}

void jump(string &in asEntity, string &in type) <---- wheres body

{
SetEntityActive("corpse01", true);
PlaySoundAtEntity("", "21_screams.snt", "corpse01", 0, false);
}
where do I write the body= can you give me the full script

No, because only you know that will perform this function in your game Smile


RE: Script Problems - Coolfromdah00d - 03-06-2013

(03-06-2013, 04:57 PM)Tiero Wrote:
(03-06-2013, 04:55 PM)Coolfromdah00d Wrote:
(03-06-2013, 04:14 PM)Tiero Wrote:
(03-06-2013, 03:47 PM)Coolfromdah00d Wrote:
(03-05-2013, 10:19 PM)darksky Wrote: what's the exact error message?

unexpected token {

{
SetEntityCallbackFunc("GuestRoomKey", "jump");
}

void jump(string &in asEntity, string &in type) <---- wheres body

{
SetEntityActive("corpse01", true);
PlaySoundAtEntity("", "21_screams.snt", "corpse01", 0, false);
}
where do I write the body= can you give me the full script

No, because only you know that will perform this function in your game Smile
alright first of all: pleae speak english..

second: I added corpse01 but i just got another error plus expected token


RE: Script Problems - Wapez - 03-06-2013

{
SetEntityCallbackFunc("GuestRoomKey", "jump");
}

void jump(string &in asEntity, string &in type)
{
SetEntityActive("corpse01", true);
PlaySoundAtEntity("", "21_screams.snt", "corpse01", 0, false);
}

too big space between jump and {


RE: Script Problems - Coolfromdah00d - 03-06-2013

I still get the unexpected token though


RE: Script Problems - ExpectedIdentifier - 03-06-2013

You haven't put any callback before the { bracket to call the setentitycallbackfunc function.


RE: Script Problems - Coolfromdah00d - 03-06-2013

(03-06-2013, 05:51 PM)sonataarctica Wrote: You haven't put any callback before the { bracket to call the setentitycallbackfunc function.

What do you mean?


I'm sorry... this is my frist custom story ever and I'm trying to make it as good as I can.


RE: Script Problems - darksky - 03-06-2013

you have to put SetEntityCallbackFunc in a function

like
Code:
void OnStart(){
   SetEntityCallbackFunc("GuestRoomKey", "jump");
}