The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
Script Help Unexpected Token "{"
BadCoverMan Offline
Junior Member

Posts: 27
Threads: 7
Joined: Feb 2012
Reputation: 0
#1
Unexpected Token "{"

I've looked up and down this thing a lot, but I can't find the problem. I'm new to scripting.
Any help would be much appreciated! Blush

Spoiler below!

Void Intro(string &in asTimer)
{
if(asTimer == "FadeIn_1")
{
FadeIn(3);
}
if(asTimer == "Music_1")
{
PlayMusic("09_amb_safe.ogg", true, 1.00, 1, 5, true);
}
if(asTimer == "Stop_1")
{
StopMusic(2, 5);
}
}

void OnStart()
{
FadeOut(0);
AddTimer("FadeIn_1", 1, "Intro");
AddTimer("Music_1", 4, "Intro");
AddTimer("Stop_1", 64, "Intro");
}

{
AddEntityCollideCallback("Player", "StudyArea", "CollideStudy", true, 1);
}

void CollideStudy(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("LockedDoor_1", true, true);
PlaySoundAtEntity("DoorClose_1", "10_close_door.snt", "StudyArea", 2, false);
}

////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "LockedDoorKey_1", "LockedDoor_1", "UsedLockedDoorKey_1", true);
}

void UsedLockedDoorKey_1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("LockedDoor_1", false, true);
PlaySoundAtEntity("", "unlock_door", "LockedDoor_1", 0, false);
RemoveItem("LockedDoorKey_1");
}


02-20-2012, 09:54 PM
Find


Messages In This Thread
Unexpected Token "{" - by BadCoverMan - 02-20-2012, 09:54 PM
RE: Unexpected Token "{" - by Your Computer - 02-20-2012, 10:14 PM
RE: Unexpected Token "{" - by BadCoverMan - 02-21-2012, 01:08 AM
RE: Unexpected Token "{" - by Juby - 02-21-2012, 02:35 AM
RE: Unexpected Token "{" - by BadCoverMan - 02-21-2012, 02:44 AM



Users browsing this thread: 1 Guest(s)