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
Unexpected end of file?!? plz help..
Roenlond Offline
Senior Member

Posts: 331
Threads: 3
Joined: Apr 2011
Reputation: 0
#2
RE: Unexpected end of file?!? plz help..

(05-11-2011, 04:49 PM)Jumpman Wrote: Plz help me and se if you can find the problem.. becouse right now Im lost... The error when I try to start the map say...

---------------------------------------
main (81,2) ERR : Unexpected end of file
---------------------------------------

The (81,2) show the last '}' (example: void OnLeave()
{
----> } <----)
And I dont know whats the problem then...
Here is the full script...

void OnStart()
{
AddEntityCollideCallback("Player", "GruntTrigger", "CollideGruntTrigger", true, 0);
}



//===========================================
// This runs when the player enters the map
void OnEnter()
{

SetEntityPlayerInteractCallback("Reddoor", "InteractReddoor", true);

AddUseItemCallback("","StorageKey_1", "StorageDoor", "UsedStorageKey_1", true);

AddUseItemCallback("","UpperDoorKey_1", "UpperDoor", "UsedUpperDoorKey_1", true);

AddUseItemCallback("","ChestCrowbar_1", "DoorChest", "UsedChestCrowbar_1", true);

AddUseItemCallback("","EasterEggKey_1", "EasterEggDoor", "UsedEasterEggKey_1", true);

AddUseItemCallback("","ReddoorKey_1", "Reddoor", "UsedReddoorKey_1", true);
}

void CollideGruntTrigger(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servantgrunt", true);
GiveSanityDamage(20, true);
}


void UsedStorageKey_1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("StorageDoor", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "StorageDoor", 0.0f, true);
RemoveItem("StorageKey_1");
}

void UsedUpperDoorKey_1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("UpperDoor", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "UpperDoor", 0.0f, true);
RemoveItem("UpperDoorKey_1");
}

void UsedChestCrowbar_1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("DoorChest", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "DoorChest", 0.0f, true);
RemoveItem("ChestCrowbar_1");
}

void UsedEasterEggKey_1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("EasterEggDoor", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "EasterEggDoor", 0.0f, true);
RemoveItem("EasterEggKey_1");
}

void UsedReddoorKey_1(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("Reddoor", false);
PlaySoundAtEntity("", "unlock_door.snt", "Reddoor", 0.0f, true);
RemoveItem("ReddoorKey_1");
}

void InteractReddoor(string &in asEntity)
{
if("SetLevelDoorLocked ("Reddoor") == true);
SetMessage("mapone", "ReddoorMessage", 5.0f);
}

//===========================================
// This runs when the player leaves the map
void OnLeave()
{

}

Try the script in quotes. You left quotation marks after a true and a false.
05-11-2011, 05:01 PM
Find


Messages In This Thread
Unexpected end of file?!? plz help.. - by Jumpman - 05-11-2011, 04:49 PM
RE: Unexpected end of file?!? plz help.. - by Roenlond - 05-11-2011, 05:01 PM



Users browsing this thread: 1 Guest(s)