08-05-2011, 06:26 PM
Okay, i have a problem... I think i added everything,changed and looked around the code's for 3 time's still getting this error. 
Here is the code:

Here is the code:
Code:
void OnStart()
{
AddUseItemCallback("item1","keykiller1","woodendoor1","dooropen",true);
SetEntityCallbackFunc("keykiller1","zombietime");
AddEntityCollideCallback("eater1","autoscript","killer",false,0);
AddEntityCollideCallback("Player","area","en",false,1);
AddEntityCollideCallback("Player","area","de",false,-1);
AddUseItemCallbackFunc("keyer","key_to_level2","ending_door","dooropen2", true);
}
void OnEnter()
{
}
void OnLeave()
{
}
void dooropen(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("woodendoor1",false,true);
}
void zombietime(string &in entity, string &in type)
{
StartEffectFlash(2,0.8,2);
SetEntityActive("servant_grunt_1",true);
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_1",0,"");
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_2",0,"");
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_3",0,"");
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_4",0,"");
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_5",0,"");
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_6",0,"");
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_4",0,"");
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_3",0,"");
SetPropHealth("ddoor1",0);
AddTimer("timerzombie",30,"killzombie");
}
void killzombie(string &in asTimer)
{
FadeEnemyToSmoke("servant_grunt_1",true);
}
void killer(string &in asParent, string &in asChild, int alState)
{
AddEnemyPatrolNode("eater1","PathNodeArea_7",0,"");
AddEnemyPatrolNode("eater1","PathNodeArea_8",0,"");
void en(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("box1enable",false);
}
void de(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("box1enable",true);
}
void dooropen2(string& asName, bool abLocked)
{
SetLevelDoorLocked("ending_door",false);
RemoveItem("keyer");
}