Janni1234
Member
Posts: 134
Threads: 24
Joined: Jan 2011
Reputation:
1
What is wrong?
void OnStart()
{
PlayMusic("02_amb_safe.ogg", true, 0.7f, 1, 0, true);
AddEntityCollideCallback("Player", "breath", "breath", 1, true);
AddEntityCollideCallback("Player", "break", "break", 1, true);
}
void breath(string &in asParent , string &in asChild , int alState)
{
StartPlayerLookAt("look1", 4.0, 6.0f, "");
StartPlayerLookAt("look2", 4.0, 6.0f, "");
StartPlayerLookAt("look3", 4.0, 6.0f, "");
PlaySoundAtEntity("", "00_creak.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_breath1.snt", "Player", 0, false);
}
void break(string &in asParent , string &in asChild , int alState)
{
StartPlayerLookAt("a", 4.0, 6.0f, "");
StartPlayerLookAt("b", 4.0, 6.0f, "");
StartScreenShake(1.0f, 5.98, 1.0f, 2.0f);
AddTimer("Timer", 3.1f, "fadeout");
PlaySoundAtEntity("", "general_rock_rumble.snt", "Player", 0, false);
}
void fadeout(string &in asTimer)
{
FadeOut(2)
AddTimer("Timer", 2f, "boom");
}
void boom(string &in asTimer)
{
PlaySoundAtEntity("", "explosion_rock_large.snt", "Player", 0, false);
AddTimer("Timer", 1.0f, "change");
}
void change(string &in asTimer)
{
ChangeMap("CHURCH2.map", "PlayerStartArea_1", "", "");
}
He says: Unexpected Endentifier 19, 6
I need help
Sorry i mean identifier
(This post was last modified: 05-17-2011, 03:02 PM by Janni1234 .)
05-17-2011, 03:00 PM
Acies
Posting Freak
Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation:
73
RE: What is wrong?
FadeOut(2)
Missing a ;
He says: Unexpected Endentifier 19, 6
I need help
19 means line numer 19. 6 means letter number six. Makes it easier to check where the error is
ジ
(This post was last modified: 05-17-2011, 03:09 PM by Acies .)
05-17-2011, 03:08 PM
Janni1234
Member
Posts: 134
Threads: 24
Joined: Jan 2011
Reputation:
1
RE: What is wrong?
Ah! Thank you so much!
Same error.It doesnt work :C
He says the same: Unexpected identifier: 19, 6
And i cant find that error.. :c
(This post was last modified: 05-17-2011, 03:56 PM by Janni1234 .)
05-17-2011, 03:26 PM
Roenlond
Senior Member
Posts: 331
Threads: 3
Joined: Apr 2011
Reputation:
0
RE: What is wrong?
Spoiler below!
void OnStart()
{
PlayMusic("02_amb_safe.ogg", true, 0.7f, 1, 0, true);
AddEntityCollideCallback("Player", "breath", "breath", 1, true);
AddEntityCollideCallback("Player", "break", "breaks", 1, true);
}
void breath(string &in asParent , string &in asChild , int alState)
{
StartPlayerLookAt("look1", 4.0, 6.0f, "");
StartPlayerLookAt("look2", 4.0, 6.0f, "");
StartPlayerLookAt("look3", 4.0, 6.0f, "");
PlaySoundAtEntity("", "00_creak.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_breath1.snt", "Player", 0, false);
}
void breaks(string &in asParent , string &in asChild , int alState)
{
StartPlayerLookAt("a", 4.0, 6.0f, "");
StartPlayerLookAt("b", 4.0, 6.0f, "");
StartScreenShake(1.0f, 5.98, 1.0f, 2.0f);
AddTimer("Timer", 3.1f, "fadeout");
PlaySoundAtEntity("", "general_rock_rumble.snt", "Player", 0, false);
}
void fadeout(string &in asTimer)
{
FadeOut(2);
AddTimer("Timer", 2f, "boom");
}
void boom(string &in asTimer)
{
PlaySoundAtEntity("", "explosion_rock_large.snt", "Player", 0, false);
AddTimer("Timer", 1.0f, "change");
}
void change(string &in asTimer)
{
ChangeMap("CHURCH2.map", "PlayerStartArea_1", "", "");
}
Try that, probably the same error but my Notepad++ didn't like the name "break".
05-17-2011, 04:04 PM
Janni1234
Member
Posts: 134
Threads: 24
Joined: Jan 2011
Reputation:
1
RE: What is wrong?
I changed the name to "rumble"
void OnStart()
{
PlayMusic("02_amb_safe.ogg", true, 0.7f, 1, 0, true);
AddEntityCollideCallback("Player", "breath", "breath", 1, true);
AddEntityCollideCallback("Player", "rumble", "rumble", 1, true);
}
void breath(string &in asParent , string &in asChild , int alState)
{
StartPlayerLookAt("look1", 4.0, 6.0f, "");
StartPlayerLookAt("look2", 4.0, 6.0f, "");
StartPlayerLookAt("look3", 4.0, 6.0f, "");
PlaySoundAtEntity("", "00_creak.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_breath1.snt", "Player", 0, false);
}
void rumble(string &in asParent , string &in asChild , int alState)
{
StartPlayerLookAt("a", 4.0, 6.0f, "");
StartPlayerLookAt("b", 4.0, 6.0f, "");
StartScreenShake(1.0f, 5.98, 1.0f, 2.0f);
AddTimer("Timer", 3.1f, "fadeout");
PlaySoundAtEntity("", "general_rock_rumble.snt", "Player", 0, false);
}
void fadeout(string &in asTimer)
{
FadeOut(2);
AddTimer("Timer", 2.0f, "boom");
}
void boom(string &in asTimer)
{
PlaySoundAtEntity("", "explosion_rock_large.snt", "Player", 0, false);
AddTimer("Timer", 1.0f, "change");
}
void change(string &in asTimer)
{
ChangeMap("CHURCH2.map", "PlayerStartArea_1", "", "");
}
Now he says : NoMatchingSignaturesTo(......) 4, 7 and 5, 7
What the hell is going on?
Something is wrong with the callbacks...
05-17-2011, 04:13 PM
Roenlond
Senior Member
Posts: 331
Threads: 3
Joined: Apr 2011
Reputation:
0
RE: What is wrong?
(05-17-2011, 04:13 PM) Janni1234 Wrote: I changed the name to "rumble"
void OnStart()
{
PlayMusic("02_amb_safe.ogg", true, 0.7f, 1, 0, true);
AddEntityCollideCallback("Player", "breath", "breath", 1, true);
AddEntityCollideCallback("Player", "rumble", "rumble", 1, true);
}
void breath(string &in asParent , string &in asChild , int alState)
{
StartPlayerLookAt("look1", 4.0, 6.0f, "");
StartPlayerLookAt("look2", 4.0, 6.0f, "");
StartPlayerLookAt("look3", 4.0, 6.0f, "");
PlaySoundAtEntity("", "00_creak.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_breath1.snt", "Player", 0, false);
}
void rumble(string &in asParent , string &in asChild , int alState)
{
StartPlayerLookAt("a", 4.0, 6.0f, "");
StartPlayerLookAt("b", 4.0, 6.0f, "");
StartScreenShake(1.0f, 5.98, 1.0f, 2.0f);
AddTimer("Timer", 3.1f, "fadeout");
PlaySoundAtEntity("", "general_rock_rumble.snt", "Player", 0, false);
}
void fadeout(string &in asTimer)
{
FadeOut(2);
AddTimer("Timer", 2.0f, "boom");
}
void boom(string &in asTimer)
{
PlaySoundAtEntity("", "explosion_rock_large.snt", "Player", 0, false);
AddTimer("Timer", 1.0f, "change");
}
void change(string &in asTimer)
{
ChangeMap("CHURCH2.map", "PlayerStartArea_1", "", "");
}
Now he says : NoMatchingSignaturesTo(......) 4, 7 and 5, 7
What the hell is going on?
Something is wrong with the callbacks...
Found it!
Spoiler below!
void OnStart()
{
PlayMusic("02_amb_safe.ogg", true, 0.7f, 1, 0, true);
AddEntityCollideCallback("Player", "breath", "breath", true, 1);
AddEntityCollideCallback("Player", "rumble", "rumble", true, 1);
}
void breath(string &in asParent , string &in asChild , int alState)
{
StartPlayerLookAt("look1", 4.0, 6.0f, "");
StartPlayerLookAt("look2", 4.0, 6.0f, "");
StartPlayerLookAt("look3", 4.0, 6.0f, "");
PlaySoundAtEntity("", "00_creak.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_breath1.snt", "Player", 0, false);
}
void rumble(string &in asParent , string &in asChild , int alState)
{
StartPlayerLookAt("a", 4.0, 6.0f, "");
StartPlayerLookAt("b", 4.0, 6.0f, "");
StartScreenShake(1.0f, 5.98, 1.0f, 2.0f);
AddTimer("Timer", 3.1f, "fadeout");
PlaySoundAtEntity("", "general_rock_rumble.snt", "Player", 0, false);
}
void fadeout(string &in asTimer)
{
FadeOut(2);
AddTimer("Timer", 2.0f, "boom");
}
void boom(string &in asTimer)
{
PlaySoundAtEntity("", "explosion_rock_large.snt", "Player", 0, false);
AddTimer("Timer", 1.0f, "change");
}
void change(string &in asTimer)
{
ChangeMap("CHURCH2.map", "PlayerStartArea_1", "", "");
}
The entitycollide order is parent, child, callback, deleteoncollide and then alstate. You had alstate (the 1) and deleteoncollide(true) in switched places. It should work now
05-17-2011, 04:32 PM
Janni1234
Member
Posts: 134
Threads: 24
Joined: Jan 2011
Reputation:
1
RE: What is wrong?
Okay it works now.Thanks
05-17-2011, 04:46 PM