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


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What's wrong?
Rassagai Offline
Junior Member

Posts: 13
Threads: 5
Joined: Aug 2012
Reputation: 0
#1
What's wrong?

main (10,1) : ERR Expected "," or ";"

////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "Area6", "CaeHumano", true, 0);
AddEntityCollideCallback("Player", "Area6", "CaeHumano2", true, 0);
}

void CaeHumano(string &in asParent, string &in asChild, int alState)
void llave_cara(string &in asEntity)
{
SetEntityActive("Humano", true);
SetEntityActive("Humano2", true);
SetEntityActive("head", true);
PlaySoundAtEntity("", "24_iron_maiden.snt", "Player", 0, false);
}

////////////////////////////
// Run when entering map
void OnEnter()
{


}
////////////////////////////
// Run when leaving map
void OnLeave()
{

}
08-02-2012, 07:13 PM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#2
RE: What's wrong?

Doing this alone will stop any errors:


////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "Area6", "CaeHumano", true, 0);
AddEntityCollideCallback("Player", "Area6", "CaeHumano2", true, 0);
}

void CaeHumano(string &in asParent, string &in asChild, int alState)
{

}

void llave_cara(string &in asEntity)
{
SetEntityActive("Humano", true);
SetEntityActive("Humano2", true);
SetEntityActive("head", true);
PlaySoundAtEntity("", "24_iron_maiden.snt", "Player", 0, false);
}

////////////////////////////
// Run when entering map
void OnEnter()
{


}
////////////////////////////
// Run when leaving map
void OnLeave()
{

}

But your script doesn't seem correct, it's hard to tell what you're trying to accomplish with it. My Spanish is a bit rusty, but llave_cara seems like the name for a key, not one of the functions you set up in a callback (although it's likely you used the level editor method for setting up the callback). Also, you have two different functions set up from your callbacks (CaeHumano and CaeHumano2), both of which are triggered by the player colliding with the same area (Area6), that could be problematic in the future.

I'll need some specific information before I can be of further help.

I rate it 3 memes.
08-02-2012, 07:22 PM
Find
Rassagai Offline
Junior Member

Posts: 13
Threads: 5
Joined: Aug 2012
Reputation: 0
#3
RE: What's wrong?

(08-02-2012, 07:22 PM)andyrockin123 Wrote: Doing this alone will stop any errors:


////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "Area6", "CaeHumano", true, 0);
AddEntityCollideCallback("Player", "Area6", "CaeHumano2", true, 0);
}

void CaeHumano(string &in asParent, string &in asChild, int alState)
{

}

void llave_cara(string &in asEntity)
{
SetEntityActive("Humano", true);
SetEntityActive("Humano2", true);
SetEntityActive("head", true);
PlaySoundAtEntity("", "24_iron_maiden.snt", "Player", 0, false);
}

////////////////////////////
// Run when entering map
void OnEnter()
{


}
////////////////////////////
// Run when leaving map
void OnLeave()
{

}

But your script doesn't seem correct, it's hard to tell what you're trying to accomplish with it. My Spanish is a bit rusty, but llave_cara seems like the name for a key, not one of the functions you set up in a callback (although it's likely you used the level editor method for setting up the callback). Also, you have two different functions set up from your callbacks (CaeHumano and CaeHumano2), both of which are triggered by the player colliding with the same area (Area6), that could be problematic in the future.

I'll need some specific information before I can be of further help.
THANKS!!!!
08-02-2012, 09:19 PM
Find




Users browsing this thread: 1 Guest(s)