Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Questions
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#1
Sad  UNEXPECTED ERROR

Please Help me!
i want to make a Naked guy JumpscarE (teleport)
but if i do every steps and i open it says Unexpected token blabla line (11,1)
This is my Script:

void onstart ()
{
AddEntityCollideCallback("Player", "Teleport", "jumpscare", true, 1);
}

void jumpscare (string &in asParents, string &in asChild, int alstates);
{
SetEntityActive("jumpscare1", true);
AddPropForce("jumpscare1", -10000, 0, 0, "world");
PlaySoundAtEntity("", "24_iron_maiden.snt", "jumpscare1", 0, false);
}

PLEASE HELP ME!
06-06-2014, 02:44 PM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#2
RE: UNEXPECTED ERROR

It is this : (string &in asParent, string &in asChild, int alState)
NOT Parent(s) in alstate(s)
-
Also check the CAPITAL letters.
(This post was last modified: 06-06-2014, 03:11 PM by DnALANGE.)
06-06-2014, 03:02 PM
Find
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#3
RE: UNEXPECTED ERROR

It is this : (string &in asParent, string &in asChild, int alState)
NOT Parent(s) in alstate(s)
-
Also check the CAPITAL letters.
[/quote]
thanks! i did that one.. but now it says Unexpected token line 7,1 ? X_X
06-06-2014, 03:29 PM
Find
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#4
RE: UNEXPECTED ERROR

There's a ; on the jumpscare script.

void jumpscare (string &in asParent, string &in asChild, int alState)

It's supposed to be like this.

Derp.
06-06-2014, 04:01 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#5
RE: UNEXPECTED ERROR

Make sure void OnStart() has the proper capitals as well. The s'es in your constructor don't really make a difference.

06-06-2014, 04:08 PM
Find
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#6
RE: UNEXPECTED ERROR

[quote='Neelke' pid='296615' dateline='1402066911']
There's a ; on the jumpscare script.

void jumpscare (string &in asParent, string &in asChild, int alState)

Thanks!" it worked! no error!
but my naked man doesn´t come to let me scream Sad
06-06-2014, 04:16 PM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#7
RE: UNEXPECTED ERROR

PHP Code: (Select All)
void onstart () //should be void OnStart()...//
{
     
AddEntityCollideCallback("Player""Teleport""jumpscare"true1);
}

void jumpscare (string &in asParentsstring &in asChildint alstates); //It's asParent, asChild and int alState). No semicolon in callback syntax, that's for functions only//
{
     
SetEntityActive("jumpscare1"true);
     
AddPropForce("jumpscare1", -1000000"world");
     
PlaySoundAtEntity("""24_iron_maiden.snt""jumpscare1"0false);


EDIT:
The object jumpscare1 should be applied the force depending on where you are. It's not always on the X coordinate. The Z coordinate is possible.

"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 06-06-2014, 04:19 PM by PutraenusAlivius.)
06-06-2014, 04:17 PM
Find
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#8
RE: UNEXPECTED ERROR

(06-06-2014, 04:17 PM)SomethingRidiculous Wrote:
PHP Code: (Select All)
void onstart () //should be void OnStart()...//
{
     
AddEntityCollideCallback("Player""Teleport""jumpscare"true1);
}

void jumpscare (string &in asParentsstring &in asChildint alstates); //It's asParent, asChild and int alState). No semicolon in callback syntax, that's for functions only//
{
     
SetEntityActive("jumpscare1"true);
     
AddPropForce("jumpscare1", -1000000"world");
     
PlaySoundAtEntity("""24_iron_maiden.snt""jumpscare1"0false);


EDIT:
The object jumpscare1 should be applied the force depending on where you are. It's not always on the X coordinate. The Z coordinate is possible.

i don't understand ?! on youtube they talked about x and z cordinate but i didn't understand that so i did what the youtuber did...
06-06-2014, 04:23 PM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#9
RE: UNEXPECTED ERROR

Basically, if it is moving correctly, don't worry about it.

Otherwise
Spoiler below!

X and Z are directions in Amnesia. X is the width co-ordinate, Y is the height co-ordinate, Z is the length co-ordinate. X and Z are essentially either going to be Left-Right/Forward-Back OR Forward-Back/Left-Right, however it really depends on how your map is laid out. It is a little difficult to explain, but you understand when you map a little more.


If it moves in the wrong direction, change this:
PHP Code: (Select All)
AddPropForce("jumpscare1", -1000000"world"); //Moves negative X relative to the world. 


To any of these, and figure out which one works best for you!
PHP Code: (Select All)
AddPropForce("jumpscare1"1000000"world"); //Moves positive X relative to the world. 
PHP Code: (Select All)
AddPropForce("jumpscare1"00, -10000"world"); //Moves negative Z relative to the world. 
PHP Code: (Select All)
AddPropForce("jumpscare1"0010000"world"); //Moves positive Z relative to the world. 

Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 06-06-2014, 04:52 PM by Romulator.)
06-06-2014, 04:43 PM
Find
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#10
RE: UNEXPECTED ERROR

(06-06-2014, 04:43 PM)Romulator Wrote: Basically, if it is moving correctly, don't worry about it.

Otherwise
Spoiler below!

X and Z are directions in Amnesia. X is the width co-ordinate, Y is the height co-ordinate, Z is the length co-ordinate. X and Z are essentially either going to be Left-Right/Forward-Back OR Forward-Back/Left-Right, however it really depends on how your map is laid out. It is a little difficult to explain, but you understand when you map a little more.


If it moves in the wrong direction, change this:
PHP Code: (Select All)
AddPropForce("jumpscare1", -1000000"world"); //Moves negative X relative to the world. 


To any of these, and figure out which one works best for you!
PHP Code: (Select All)
AddPropForce("jumpscare1"1000000"world"); //Moves positive X relative to the world. 
PHP Code: (Select All)
AddPropForce("jumpscare1"00, -10000"world"); //Moves negative Z relative to the world. 
PHP Code: (Select All)
AddPropForce("jumpscare1"0010000"world"); //Moves positive Z relative to the world. 

thanks! but.. Before i try...
i want to say... my dude DON'T come...
no sound... nopthing.. the area thing doesn't work...
06-06-2014, 04:56 PM
Find




Users browsing this thread: 2 Guest(s)