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
Err (60, 26) Expected '('
DaAinGame Offline
Member

Posts: 90
Threads: 11
Joined: Mar 2012
Reputation: 4
#3
RE: Err (60, 26) Expected '('

I honestly don't know if this worked for you before but to me this is REALLY jumbled. I'm going to give you corrected code and then you can ask questions on the changes I made.

////////////////////////////
// Run when the map starts
void OnStart()
{
AddUseItemCallback("", "DungeonKey1", "DungeonDoor", "UnlockDungeon", true);
}



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

}

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

}

void UnlockDungeon(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Dungeondoor", false, true);
PlaySoundAtEntity("", "unlock_door", "Dungeondoor", 0, false);
RemoveItem("DungeonKey1");
}

void ActivateMonster (string &in item)
{
SetEntityActive("DungeonGrunt", true);
AddEnemyPatrolNode("DungeonGrunt", "PathNodeArea_1", 0, "idle");
AddEnemyPatrolNode("DungeonGrunt", "PathNodeArea_2", 0, "idle");
AddTimer("",30,"DeactivateMonster");
}

void DeactivateMonster (string &in asTimer)
{
SetEntityActive("DungeonGrunt", false);
AddTimer("",10,"ChangeMap"); //I'm not sure what the timer is for, but it needs a function callback. So I made it activate the map change
}


void ChangeMap(string &in asTimer)
{
ChangeMap("Test2.map," "PlayerStartArea_2", "", "");
}

I'm pretty sure this should work, just make sure everything in your level editor is named correctly.

*EDIT*
Someone beat me to it >.<

Realm Of Another Chapter 1: http://www.frictionalgames.com/forum/thread-14142.html
Realm Of Another Chapter 2: Postponed
Adder Halls: 5%
(This post was last modified: 06-17-2012, 10:52 PM by DaAinGame.)
06-17-2012, 10:47 PM
Find


Messages In This Thread
Err (60, 26) Expected '(' - by Matt201496 - 06-17-2012, 10:25 PM
RE: Err (60, 26) Expected '(' - by Adny - 06-17-2012, 10:46 PM
RE: Err (60, 26) Expected '(' - by DaAinGame - 06-17-2012, 10:47 PM
RE: Err (60, 26) Expected '(' - by Matt201496 - 06-17-2012, 11:43 PM
RE: Err (60, 26) Expected '(' - by Adny - 06-18-2012, 12:40 AM



Users browsing this thread: 1 Guest(s)