Saren
Member
Posts: 196
Threads: 20
Joined: Jan 2012
Reputation:
1
|
FATAL ERROR
I got a script here,
It says (1,1) Err: No matching signatures to 'OnLeave()' main 44,15):Err Unexpected end of file
// Run when entering map
void OnStart()
{
AddUseItemCallback("", "Prisonkey", "prisondoor", "UsedKeyOnDoor", true);
AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("prisondoor", false, true);
PlaySoundAtEntity("", "unlock_door", "prisondoor", 0, false);
RemoveItem("Prisonkey");
}
//Prison brute
void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_brute", true);
AddEnemyPatrolNode("servant_brute", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_10", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_11", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_12", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_13", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_14", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_15", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_16", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_17", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_18", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_19", 0, "");
}
void Despawngrunt_foodstorage(string &in asParent , string &in asChild , int alState)
{
SetEntityActiveservant_brute", false);
}
void OnLeave()
|
|
02-22-2012, 12:06 PM |
|
flamez3
Posting Freak
Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation:
57
|
RE: FATAL ERROR
You forgot the
{
}
in void OnLeave...
void OnLeave
{
}
|
|
02-22-2012, 12:09 PM |
|
Saren
Member
Posts: 196
Threads: 20
Joined: Jan 2012
Reputation:
1
|
RE: FATAL ERROR
(02-22-2012, 12:09 PM)flamez3 Wrote: You forgot the
{
}
in void OnLeave...
void OnLeave
{
} Aaaaah thx xD
EDIT: Same, now it's just on line 47 which is basically the same place, just the last } insted
(This post was last modified: 02-22-2012, 09:23 PM by Saren.)
|
|
02-22-2012, 04:23 PM |
|
flamez3
Posting Freak
Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation:
57
|
RE: FATAL ERROR
You have : SetEntityActiveservant_brute", false); On line 39. Change that
SetEntityActive("servant_brute", false);
|
|
02-23-2012, 12:37 AM |
|
Saren
Member
Posts: 196
Threads: 20
Joined: Jan 2012
Reputation:
1
|
RE: FATAL ERROR
Aaaand here we go again,
Execute string (1,1) ERR: No matching signatures to OnLeave() main 45,1 ERR: Expected (
Funny thing is... I already got a { there...
// Run when entering map
void OnStart()
{
AddUseItemCallback("", "Prisonkey", "prisondoor", "UsedKeyOnDoor", true);
AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("prisondoor", false, true);
PlaySoundAtEntity("", "unlock_door", "prisondoor", 0, false);
RemoveItem("Prisonkey");
}
//Prison brute
void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_brute", true);
AddEnemyPatrolNode("servant_brute", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_10", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_11", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_12", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_13", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_14", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_15", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_16", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_17", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_18", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_19", 0, "");
}
void Despawnservant_brute(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("servant_brute", false);
}
void OnLeave
{
}
(This post was last modified: 02-27-2012, 09:41 AM by Saren.)
|
|
02-27-2012, 09:40 AM |
|
Linus Ågren
Senior Member
Posts: 309
Threads: 58
Joined: Jan 2011
Reputation:
5
|
RE: FATAL ERROR
You're missing () on your "void OnLeave".
Creator of The Dark Treasure.
|
|
02-27-2012, 01:09 PM |
|
Saren
Member
Posts: 196
Threads: 20
Joined: Jan 2012
Reputation:
1
|
RE: FATAL ERROR
(02-27-2012, 01:09 PM)junkfood2121 Wrote: You're missing () on your "void OnLeave". Hahaha yea I know, I have fixed it, but thx anyway dude xD
|
|
02-27-2012, 05:41 PM |
|
jessehmusic
Senior Member
Posts: 423
Threads: 102
Joined: Dec 2011
Reputation:
8
|
RE: FATAL ERROR
(02-27-2012, 05:41 PM)Saren Wrote: (02-27-2012, 01:09 PM)junkfood2121 Wrote: You're missing () on your "void OnLeave". Hahaha yea I know, I have fixed it, but thx anyway dude xD I have made that misstake alot of time haha i know that feeling :S
|
|
02-28-2012, 12:43 AM |
|
|