Amnesiaplayer
Senior Member
Posts: 539
Threads: 105
Joined: Jun 2014
Reputation:
0
|
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 |
|
DnALANGE
Banned
Posts: 1,549
Threads: 73
Joined: Jan 2012
|
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 |
|
Amnesiaplayer
Senior Member
Posts: 539
Threads: 105
Joined: Jun 2014
Reputation:
0
|
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 |
|
Neelke
Senior Member
Posts: 668
Threads: 82
Joined: Apr 2013
Reputation:
26
|
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 |
|
Mudbill
Muderator
Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation:
179
|
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 |
|
Amnesiaplayer
Senior Member
Posts: 539
Threads: 105
Joined: Jun 2014
Reputation:
0
|
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
|
|
06-06-2014, 04:16 PM |
|
PutraenusAlivius
Posting Freak
Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation:
119
|
RE: UNEXPECTED ERROR
void onstart () //should be void OnStart()...// { AddEntityCollideCallback("Player", "Teleport", "jumpscare", true, 1); }
void jumpscare (string &in asParents, string &in asChild, int alstates); //It's asParent, asChild and int alState). No semicolon in callback syntax, that's for functions only// { SetEntityActive("jumpscare1", true); AddPropForce("jumpscare1", -10000, 0, 0, "world"); PlaySoundAtEntity("", "24_iron_maiden.snt", "jumpscare1", 0, false); }
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."
|
|
06-06-2014, 04:17 PM |
|
Amnesiaplayer
Senior Member
Posts: 539
Threads: 105
Joined: Jun 2014
Reputation:
0
|
RE: UNEXPECTED ERROR
(06-06-2014, 04:17 PM)SomethingRidiculous Wrote: void onstart () //should be void OnStart()...// { AddEntityCollideCallback("Player", "Teleport", "jumpscare", true, 1); }
void jumpscare (string &in asParents, string &in asChild, int alstates); //It's asParent, asChild and int alState). No semicolon in callback syntax, that's for functions only// { SetEntityActive("jumpscare1", true); AddPropForce("jumpscare1", -10000, 0, 0, "world"); PlaySoundAtEntity("", "24_iron_maiden.snt", "jumpscare1", 0, false); }
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 |
|
Romulator
Not Tech Support ;-)
Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation:
195
|
RE: UNEXPECTED ERROR
Basically, if it is moving correctly, don't worry about it.
Otherwise
If it moves in the wrong direction, change this:
AddPropForce("jumpscare1", -10000, 0, 0, "world"); //Moves negative X relative to the world.
To any of these, and figure out which one works best for you!
AddPropForce("jumpscare1", 10000, 0, 0, "world"); //Moves positive X relative to the world.
AddPropForce("jumpscare1", 0, 0, -10000, "world"); //Moves negative Z relative to the world.
AddPropForce("jumpscare1", 0, 0, 10000, "world"); //Moves positive Z relative to the world.
Discord: Romulator#0001
(This post was last modified: 06-06-2014, 04:52 PM by Romulator.)
|
|
06-06-2014, 04:43 PM |
|
Amnesiaplayer
Senior Member
Posts: 539
Threads: 105
Joined: Jun 2014
Reputation:
0
|
RE: UNEXPECTED ERROR
(06-06-2014, 04:43 PM)Romulator Wrote: Basically, if it is moving correctly, don't worry about it.
Otherwise
If it moves in the wrong direction, change this:
AddPropForce("jumpscare1", -10000, 0, 0, "world"); //Moves negative X relative to the world.
To any of these, and figure out which one works best for you!
AddPropForce("jumpscare1", 10000, 0, 0, "world"); //Moves positive X relative to the world.
AddPropForce("jumpscare1", 0, 0, -10000, "world"); //Moves negative Z relative to the world.
AddPropForce("jumpscare1", 0, 0, 10000, "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 |
|
|