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
FATAL ERROR help :/ *UPDATED*
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#5
RE: FATAL ERROR help :/ *UPDATED*

(10-13-2011, 11:58 AM)Luis Wrote:
void OnStart()
{
AddEntityCollideCallback("Player" , "ScriptArea_1" , "MonsterFunc1" , true , 1);
}
void MonsterFunc1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("servant_brute_1" , true);
PlaySoundAtEntity("", "explosion_rock_large.snt", "Player", 0.5f, false);

{    <--- legal, but not needed
AddEntityCollideCallback("Player" , "ScriptArea_2" , "MonsterFunc1" , true , 1);
}    <--- legal, but not needed

/*
These lines below are illegal, functions cannot be defined inside other functions. This means previous function is still being defined, because there's no closing bracket before this. Added to that, the following function has the same name.
*/
void MonsterFunc1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("barrel01_20" , true);
SetEntityActive("barrel01_21" , true);
SetEntityActive("barrel01_22" , true);
SetEntityActive("barrel01_28" , true);
SetEntityActive("barrel01_29" , true);
SetEntityActive("barrel01_23" , true);
SetEntityActive("barrel01_24" , true);
SetEntityActive("barrel01_25" , true);
SetEntityActive("barrel01_27" , true);
SetEntityActive("barrel01_26" , true);
SetEntityActive("barrel01_10" , true);
PlaySoundAtEntity("", "explosion_rock_large.snt", "Player", 0.5f, false);
}

} <-- This is closing the first MonsterFunc1

I suggest you check the basics of the scripting language, as in how to build correct structures and stuff like that before doing any real work. Trust me, it will save you lots of headaches Smile

I did just that just then and it is not exactly helping me in this situation :S

10-13-2011, 12:16 PM
Find


Messages In This Thread
FATAL ERROR help :/ *UPDATED* - by flamez3 - 10-13-2011, 08:22 AM
RE: FATAL ERROR help :/ - by Luis - 10-13-2011, 08:27 AM
RE: FATAL ERROR help :/ - by flamez3 - 10-13-2011, 08:32 AM
RE: FATAL ERROR help :/ *UPDATED* - by Luis - 10-13-2011, 11:58 AM
RE: FATAL ERROR help :/ *UPDATED* - by flamez3 - 10-13-2011, 12:16 PM
RE: FATAL ERROR help :/ *UPDATED* - by Luis - 10-13-2011, 12:33 PM



Users browsing this thread: 1 Guest(s)